Hi,
The numpy.where() function was rewritten in numpy 1.9 to speed it up. I
traced it to this changeset.
https://github.com/numpy/numpy/commit/593e3c30c24f0c61a271dc883c614724d7a57e1e
The weird thing is the 1.9 behavior changed the resulting dtype in some
situations when using scalar values as t
What a coincidence! A very related bug just got re-opened today at my
behest: https://github.com/numpy/numpy/issues/5095
Not the same, but I wouldn't be surprised if it stems from the same
sources. The short of it...
np.where(x, 0, x)
where x is a masked array, will return a masked array in 1.8.
Thanks for the link. I'm glad I'm not the only one tripping over the
where() changes. Should I open a new ticket for what I've encountered, or
just add a comment to 5095 that the behavior of the output's dtype is also
different?
It doesn't sound like it's going to be fixed in 1.9, so I'm not sur