Skip to content

Commit

Permalink
Fix scipy minimize floating point issue
Browse files Browse the repository at this point in the history
- Scipy.minimize no longer supports extended precision
- added conversion from np.longdouble to np.float64
  • Loading branch information
Ali-Tehrani committed Nov 5, 2024
1 parent 45b5586 commit fe0799b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bfit/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,8 @@ def print_results(xk, _):
print(template_iters.format(*performance))
callback = print_results
# optimize
# scipy.minimize no longer supports extended precision
x0 = x0.astype(np.float64)
start = timer() # Start timer
res = minimize(fun=self.func,
x0=x0,
Expand Down

0 comments on commit fe0799b

Please sign in to comment.