[Numpy-discussion] bug in numpy.histogram?

Alan G Isaac aisaac at american.edu
Wed Feb 20 17:09:47 EST 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