File tree 3 files changed +3
-7
lines changed
qiskit_algorithms/optimizers
3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 1
- # Numpy 1.25 deprecated some behaviours that we used, and caused the isometry
2
- # tests to flake. See https://github.com/Qiskit/qiskit-terra/issues/10305,
3
- # remove pin when resolving that.
4
- numpy<1.25
1
+ # Constraints may be listed here
5
2
Original file line number Diff line number Diff line change @@ -57,8 +57,7 @@ def __init__(
57
57
See https://github.com/scikit-quant/scikit-quant/issues/24 for more details.
58
58
"""
59
59
# check version
60
- version = tuple (map (int , np .__version__ .split ("." )))
61
- if version >= (1 , 24 , 0 ):
60
+ if tuple (map (int , np .__version__ .split ("." )[:2 ])) >= (1 , 24 ):
62
61
raise AlgorithmError (
63
62
"SnobFit is incompatible with NumPy 1.24.0 or above, please "
64
63
"install a previous version. See also scikit-quant/scikit-quant#24."
Original file line number Diff line number Diff line change @@ -629,7 +629,7 @@ def minimize(
629
629
logger .info ("SPSA: Finished in %s" , time () - start )
630
630
631
631
if self .last_avg > 1 :
632
- x = np .mean (last_steps , axis = 0 ) # type: ignore[call-overload]
632
+ x = np .mean (np . asarray ( last_steps ) , axis = 0 )
633
633
634
634
result = OptimizerResult ()
635
635
result .x = x
You can’t perform that action at this time.
0 commit comments