Re: [Numpy-discussion] np.histogram: upper range bin

2011-06-13 Thread Christopher Barker
, 88242318.6001, 97967895.])) > I guess it is better to always specify the correct range, but wouldn't > it be preferable if the function provided a > warning when this case occurs ? > > > --- > Re: [Numpy-discussion] np.histogram: uppe

Re: [Numpy-discussion] np.histogram: upper range bin

2011-06-12 Thread Peter Butterworth
ition when using np.histogram(x): max(x) == top bin limit --- Re: [Numpy-discussion] np.histogram: upper range bin Christopher Barker Thu, 02 Jun 2011 09:19:16 -0700 Peter Butterworth wrote: > in np.histogram the top-most bin edge is inclusive of the upper range > limit. As documented in the doc

Re: [Numpy-discussion] np.histogram: upper range bin

2011-06-02 Thread Christopher Barker
Peter Butterworth wrote: > in np.histogram the top-most bin edge is inclusive of the upper range > limit. As documented in the docstring (see below) this is actually the > expected behavior, but this can lead to some weird enough results: > > In [72]: x=[1, 2, 3, 4]; np.histogram(x, bins=3) > Out[

[Numpy-discussion] np.histogram: upper range bin

2011-06-02 Thread Peter Butterworth
in np.histogram the top-most bin edge is inclusive of the upper range limit. As documented in the docstring (see below) this is actually the expected behavior, but this can lead to some weird enough results: In [72]: x=[1, 2, 3, 4]; np.histogram(x, bins=3) Out[72]: (array([1, 1, 2]), array([ 1.,