[Numpy-discussion] numpy histogram : Maybe a little error in the tutorial
ralf.gommers at googlemail.com
Sat Apr 30 12:52:34 EDT 2011
On Sat, Apr 30, 2011 at 8:54 AM, tonthon <tonthon21 at gmail.com> wrote:
> I was followong the tutorial about numpy's basics and found a little
> error here :
> (n, bins) = numpy.histogram(v, bins=50, normed=1) # NumPy version (no plot)
> should be :
> (n, bins) = numpy.histogram(v, bins=50, normed=True)
Thanks for reporting, this is changed now.
> since in the 'new' version of histogram, the normed var is explicitly
> tested as a boolean (in numpy/lib/function_base.py line 380):
> if normed is False:
> elif normed is True:
This is bad style, but it was already changed in master.
More information about the NumPy-Discussion