Skip to content

Commit

Permalink
replace tol by rtol if scipy >= 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
gertjanvanzwieten committed Feb 9, 2024
1 parent 4855ec7 commit a05f972
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nutils/matrix/_scipy.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def mycallback(arg):
if callback:
callback(res)
reformat(100 * numpy.log10(max(atol, res)) / numpy.log10(atol))
lhs, status = solverfun(self.core, rhs, M=precon, tol=0., atol=atol, callback=mycallback, **solverargs)
solverargs['rtol' if scipy.version.version >= '1.12' else 'tol'] = 0.
lhs, status = solverfun(self.core, rhs, M=precon, atol=atol, callback=mycallback, **solverargs)
if status != 0:
raise Exception('status {}'.format(status))
return lhs
Expand Down

0 comments on commit a05f972

Please sign in to comment.