Ticket #605 (closed defect: fixed)
Incorrect behaviour of numpy.histogram
| Reported by: | Elby | Owned by: | somebody |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2.0 |
| Component: | numpy.lib | Version: | none |
| Keywords: | Cc: |
Description
The behavior of numpy.histogram is not consistent with its doc string :
- doc string says that, with a range argument, values outside of this range are allocated to the closest bin.
- in fact values below the range are simply ignored.
There was a discussion on this subject on the scipy.user mailing list: http://groups.google.com/group/scipy-user/browse_frm/thread/3b3166e2200f846b/d6040fb6b659c6dd?hl=fr&lnk=gst&q=histogram#d6040fb6b659c6dd
IMHO, the current behavior of numpy.histogram, that is assuming that values below the range are outliers, is not what a neophyte is waiting for, and should be clearly stated.
Besides, the user should have the possibility to choose what to do with values outside the range : just ignoring them is not a good idea in most of the case I've seen.
