Commit fb8ce947 authored by Lukas Platz's avatar Lukas Platz
Browse files

add NaN check in decent minimizer

parent f0d48bd0
Pipeline #107771 passed with stages
in 20 minutes and 53 seconds
......@@ -91,6 +91,9 @@ class DescentMinimizer(Minimizer):
if not success:
if np.isnan(new_energy.value).any():
raise ValueError("Energy is NaN")
f_k_minus_1 = energy.value
if new_energy.value > energy.value:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment