Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demand: raise error so that it is caught #12

Merged
merged 6 commits into from
Sep 2, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
demand: raise error so that it is caught
  • Loading branch information
petrasovaa committed Jul 13, 2020
commit f0be5b1d3aec07a38ea31125a3b584ff5b83239c
2 changes: 1 addition & 1 deletion r.futures/r.futures.demand/r.futures.demand.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def main():
elif method == 'logarithmic2':
popt, pcov = curve_fit(logarithmic, x, y)
initial = (popt[0], popt[1], 0)
with np.errstate(invalid='warn'): # when 'raise' it stops every time on FloatingPointError
with np.errstate(invalid='raise'): # when 'raise' it stops every time on FloatingPointError
try:
popt, pcov = curve_fit(globals()[method], x, y, p0=initial)
except (FloatingPointError, RuntimeError):
Expand Down