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)
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]
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
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
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,
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
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