-
-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Closed
Labels
00 - BugPriority: highHigh priority, also add milestones for urgent issuesHigh priority, also add milestones for urgent issuescomponent: numpy._core
Milestone
Description
Original ticket http://projects.scipy.org/numpy/ticket/2078 on 2012-03-11 by trac user muellner, assigned to unknown.
[]In NumPy release 1.5.1, the minimum/maximum/mean of empty arrays is handled in a sensible way, namely by returning an empty array:
>>> numpy.min(numpy.zeros((0,2)), axis=1)
array([], dtype=float64)
Likewise for max and mean.
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.
Metadata
Metadata
Assignees
Labels
00 - BugPriority: highHigh priority, also add milestones for urgent issuesHigh priority, also add milestones for urgent issuescomponent: numpy._core