-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Closed
Description
Arguments that would cause ufunc.__call__ to throw a warning seem to not do so when passed to ufunc.reduce:
Bug or feature?
In [24]: np.minimum(*[1, np.nan])
RuntimeWarning: invalid value encountered in minimum
Out[24]: nan
In [25]: np.minimum.reduce([1, np.nan])
Out[25]: nan
# not just minimum
In [28]: np.divide(*[1, 0])
RuntimeWarning: divide by zero encountered in true_divide
Out[28]: inf
In [29]: np.divide.reduce([1, 0])
Out[29]: infReactions are currently unavailable