Re: [Numpy-discussion] numpy.histogram not giving expected results

2014-07-01 Thread Chris Barker
A few thoughts: 1) don't use arange() for flaoting point numbers, use linspace(). 2) histogram1d is a floating point function, and you shouldn't expect exact results for floating point -- in particular, values exactly at the bin boundaries are likely to be "uncertain" -- not quite the right word,

[Numpy-discussion] numpy.histogram not giving expected results

2014-07-01 Thread Moroney, Catherine M (398D)
Hello, I'm trying to calculate a 1-d histogram of a distribution that contains mostly zeros, and I'm having problems with examples where the values to be histogrammed fall exactly on the bin boundaries: For example, this gives me the expected results (entering the exact bin values): >>> data ar