-
-
Notifications
You must be signed in to change notification settings - Fork 11k
ufunc.reduce hides warnings #8954
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
Labels
Comments
Looks like a bug to me. I suppose it could be an intentional optimization
to not check the fp flags.
…On Apr 17, 2017 1:37 PM, "Eric Wieser" ***@***.***> wrote:
Bug or feature?
In [24]: np.minimum(*[1, np.nan])
C:\Program Files\Python 3.5\Scripts\ipython:1: RuntimeWarning: invalid value encountered in minimum
Out[24]: nan
In [25]: np.minimum.reduce([1, np.nan])
Out[25]: nan
In [28]: np.divide(*[1, 0])
C:\Program Files\Python 3.5\Scripts\ipython:1: RuntimeWarning: divide by zero encountered in true_divide
Out[28]: inf
In [29]: np.divide.reduce([1, 0])
Out[29]: inf
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8954>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAlOaF3_NC4NeuRuVOeSakHlD-m6vLTsks5rw82jgaJpZM4M_i0x>
.
|
This would be quite a user visible change, as |
Yeah. You could check on the list I guess if you're worried. But adding new useful warnings isn't generally a compatibility break, and numpy already provides good tools to control these particular warnings if people don't like the chatter. |
This is a bit of a pain - |
eric-wieser
added a commit
to eric-wieser/numpy
that referenced
this issue
Jun 2, 2017
The two most visible consequences are warnings for: * np.min and np.max when inputs contain nan * np.sum when the summation (of floats) overflows Implementation taken from the code for ufunc.__call__ Fixes numpy#8954
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Arguments that would cause
ufunc.__call__
to throw a warning seem to not do so when passed toufunc.reduce
:Bug or feature?
The text was updated successfully, but these errors were encountered: