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 behavior is broken in NumPy 1.7.0.dev-56f66bb, and the line above raises a ValueError. Is this a bug or a feature? Personally, I prefer the old behavior, as it allows the easy handling of special cases (zero-sized arrays) without the need for extra checks.
It would be good to post this question on the numpy mailing list. The handling of empty arrays is something we want to sort out and it would be good to discuss this there.
This makes sense to me, it probably changed when I rewrote the ufunc 'reduce' method to optimize its cache-coherency and add NA support. I'm not sure if it's flogging a dead horse to mention that there should have been a unit test for this so it would have been caught during development instead of now.
A patch is here, but not making a PR yet because there is a traffic jam there. I'd rather not have 3 conflicting PRs all outstanding at once :-) So noting to make sure it won't get lost.
Activity
numpy-gitbot commentedon Oct 19, 2012
@charris wrote on 2012-03-11
It would be good to post this question on the numpy mailing list. The handling of empty arrays is something we want to sort out and it would be good to discuss this there.
numpy-gitbot commentedon Oct 19, 2012
@mwiebe wrote on 2012-03-12
This makes sense to me, it probably changed when I rewrote the ufunc 'reduce' method to optimize its cache-coherency and add NA support. I'm not sure if it's flogging a dead horse to mention that there should have been a unit test for this so it would have been caught during development instead of now.
numpy-gitbot commentedon Oct 19, 2012
Milestone changed to
NumPy 1.7by @mwiebe on 2012-03-12numpy-gitbot commentedon Oct 19, 2012
@charris wrote on 2012-03-12
I think that horse is now one of undead.
numpy-gitbot commentedon Oct 19, 2012
@njsmith wrote on 2012-05-20
A patch is here, but not making a PR yet because there is a traffic jam there. I'd rather not have 3 conflicting PRs all outstanding at once :-) So noting to make sure it won't get lost.
njsmith@a0448b8
numpy-gitbot commentedon Oct 19, 2012
@njsmith wrote on 2012-06-27
#323
numpy-gitbot commentedon Oct 19, 2012
@rgommers wrote on 2012-07-15
PR was merged.