[Numpy-discussion] bug in numpy.histogram?

Alan G Isaac aisaac@american....
Wed Feb 20 16:09:47 CST 2008


On Wed, 20 Feb 2008, John Hunter apparently wrote:
>   File 
>   "/home/titan/johnh/dev/lib/python2.4/site-packages/numpy/lib/function_base.py",
> line 155, in histogram 
>     if(any(bins[1:]-bins[:-1] < 0)):
> NameError: global name 'any' is not defined 

``any`` was introduced in Python 2.5, so you need ``np.any`` 
here.

Cheers,
Alan Isaac





More information about the Numpy-discussion mailing list