diff --git a/qiskit_algorithms/optimizers/spsa.py b/qiskit_algorithms/optimizers/spsa.py index 79245815..eb18b618 100644 --- a/qiskit_algorithms/optimizers/spsa.py +++ b/qiskit_algorithms/optimizers/spsa.py @@ -629,7 +629,7 @@ def minimize( logger.info("SPSA: Finished in %s", time() - start) if self.last_avg > 1: - x = np.mean(last_steps, axis=0) # type: ignore[call-overload] + x = np.mean(np.asarray(last_steps), axis=0) result = OptimizerResult() result.x = x