Skip to content

Commit

Permalink
Alter SPSA ignore - mypy failures for newer numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
woodsp-ibm committed Oct 5, 2023
1 parent 8725233 commit ad62800
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qiskit_algorithms/optimizers/spsa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ad62800

Please sign in to comment.