Commit 608bfc11 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

BUG: allow error in optimisation, if number of iterations is large enough

parent 3711b1cf
Pipeline #5188 failed with stage
in 0 seconds
......@@ -161,7 +161,7 @@ res = fitter.fit(np.zeros(final_basis.nparams), verbose_every=100, tol=1e-10)
print('Final fitting:')
print(res)
final_basis.fix(1, res.x)
if res.nit < 10 or res.status != 0:
if res.nit < 10 or (res.status != 0 and res.nit < 1000):
final_basis.save(args.out + "_no_convergence")
raise ValueError("Failed to converge")
final_basis.save(args.out)
......
Supports Markdown
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