[Numpy-discussion] Ticket #605 Incorrect behavior of numpy.histogram

LB berthe.loic@gmail....
Mon Apr 7 15:14:20 CDT 2008

+1 for axis and +1 for a keyword to define what to do with values
outside the range.

For the keyword, ather than 'outliers', I would propose 'discard' or
'exclude', because it could be used to describe the four
possibilities :
  - discard='low'      => values lower than the range are discarded,
values higher are added to the last bin
   - discard='up'       => values higher than the range are discarded,
values lower are added to the first bin
   - discard='out'      => values out of the range are discarded
   - discard=None    => values outside of this range are allocated to
the closest bin

For the default behavior, most of the case, the sum of the bins 's
population should be equal to the size of the original one for me, so
I would prefer discard=None. But I'm also okay with discard='low' in
order not to break older code, if this is clearly stated.


More information about the Numpy-discussion mailing list