[Numpy-discussion] Bug in numpy.histogram?

2008-06-09 Thread Tommy Grav
With the most recent change in numpy 1.1 it seems that numpy.histogram was broken when wanting a normalized histogram. I thought the idea was to leave the functionality of histogram as it was in 1.1 and then break the api in 1.2? import numpy a = [0,1,2,3,4,5,6,7,8] numpy.histogram(a)

Re: [Numpy-discussion] Bug in numpy.histogram?

2008-06-09 Thread Pauli Virtanen
ma, 2008-06-09 kello 11:11 -0400, Tommy Grav kirjoitti: With the most recent change in numpy 1.1 it seems that numpy.histogram was broken when wanting a normalized histogram. I thought the idea was to leave the functionality of histogram as it was in 1.1 and then break the api in 1.2? [clip]

Re: [Numpy-discussion] Bug in numpy.histogram?

2008-06-09 Thread Tommy Grav
I understand this and agree, but it still means that the API for histogram is broken since normed can only be used with the new=True parameter. I though the whole point of the future warning was to avoid this. It is not a big deal, just means that one is forced to use the new API somewhat

Re: [Numpy-discussion] Bug in numpy.histogram?

2008-06-09 Thread David Huard
2008/6/9 Tommy Grav [EMAIL PROTECTED]: I understand this and agree, but it still means that the API for histogram is broken since normed can only be used with the new=True parameter. I though the whole point of the future warning was to avoid this. It is not a big deal, just means that one

[Numpy-discussion] bug in numpy.histogram?

2008-02-20 Thread John Hunter
We recently deprecated matplotlib.mlab.hist, and I am now hitting a bug in numpy's historgram, which appears to be caused by the use of any that does not exist in the namespace. Small patch attached. The example below exposes the bug: Python 2.4.2 (#1, Feb 23 2006, 12:48:31) Type copyright,

Re: [Numpy-discussion] bug in numpy.histogram?

2008-02-20 Thread Robert Kern
On Wed, Feb 20, 2008 at 3:49 PM, John Hunter [EMAIL PROTECTED] wrote: We recently deprecated matplotlib.mlab.hist, and I am now hitting a bug in numpy's historgram, which appears to be caused by the use of any that does not exist in the namespace. Small patch attached. Fixed in SVN. Thank

Re: [Numpy-discussion] bug in numpy.histogram?

2008-02-20 Thread Alan G Isaac
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