You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't a problem for current ufuncs, but suppose there was a binary ufunc addrounded(a, b) that added the rounded values of a and b. Then addrounded.reduce(1.5) should be 1, but currently it will just return the element 1.5 without calling the inner loop that would round the result. On the other hand, it would work fine with addrounded.reduce([1.5])
The text was updated successfully, but these errors were encountered:
Closing, seems like a bridge/enhancement to cross when someone actually needs to add such a ufunc. If we really need it, I think it could be done with a flag once gh-20970 is in.
I actually suspect it already works so long you make sure that the reduction has an identity, but if it has not, we cannot call the innerloop anyway.
Original ticket http://projects.scipy.org/numpy/ticket/2020 on 2012-01-15 by @charris, assigned to unknown.
This isn't a problem for current ufuncs, but suppose there was a binary ufunc addrounded(a, b) that added the rounded values of a and b. Then addrounded.reduce(1.5) should be 1, but currently it will just return the element 1.5 without calling the inner loop that would round the result. On the other hand, it would work fine with addrounded.reduce([1.5])
The text was updated successfully, but these errors were encountered: