hist is broken in SVN when using numpy 1.1.0.dev5077

Hello,
I am using r5186 from the SVN with numpy 1.1.0.dev5077. When I try
hist(rand(512),arange(-128,127))
I get:

···

---------------------------------------------------------------------------
<type 'exceptions.TypeError'> Traceback (most recent call last)

/home/gej/casper_work/backend/qtSpec/src/<ipython console> in <module>()

/usr/lib/python2.5/site-packages/matplotlib/pyplot.py in hist(*args, **kwargs)
   1688 hold(h)
   1689 try:
-> 1690 ret = gca().hist(*args, **kwargs)
   1691 draw_if_interactive()
   1692 except:

/usr/lib/python2.5/site-packages/matplotlib/axes.py in hist(self, x,
bins, normed, cumulative, bottom, histtype, align, orientation, width,
log, **kwargs)
   5472 if not self._hold: self.cla()
   5473 n, bins = np.histogram(x, bins, range=None,
-> 5474 normed=bool(normed), new=True)
   5475
   5476 if cumulative:

<type 'exceptions.TypeError'>: histogram() got an unexpected keyword
argument 'new'

I guess the new keyword argument has been deprecated?

Hi Glenn,
I do not reproduce your problem with current revisions of numpy and matplotlib.
best,
Johann

G Jones wrote:

···

Hello,
I am using r5186 from the SVN with numpy 1.1.0.dev5077. When I try
hist(rand(512),arange(-128,127))
I get:
---------------------------------------------------------------------------
<type 'exceptions.TypeError'> Traceback (most recent call last)

/home/gej/casper_work/backend/qtSpec/src/<ipython console> in <module>()

/usr/lib/python2.5/site-packages/matplotlib/pyplot.py in hist(*args, **kwargs)
   1688 hold(h)
   1689 try:
-> 1690 ret = gca().hist(*args, **kwargs)
   1691 draw_if_interactive()
   1692 except:

/usr/lib/python2.5/site-packages/matplotlib/axes.py in hist(self, x,
bins, normed, cumulative, bottom, histtype, align, orientation, width,
log, **kwargs)
   5472 if not self._hold: self.cla()
   5473 n, bins = np.histogram(x, bins, range=None,
-> 5474 normed=bool(normed), new=True)
   5475
   5476 if cumulative:

<type 'exceptions.TypeError'>: histogram() got an unexpected keyword
argument 'new'

I guess the new keyword argument has been deprecated?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Hi Glenn,

please update numpy!!! Indeed, it is the other way around: The "new" keyword-arg isn't deprecated it is *NEW* (has been added in numpy revision r5085, you are using r5077). Have a look at this:

http://projects.scipy.org/scipy/numpy/roadmap#Semanticchangeforhistogram

Please note that this also means a change in the semantic of the matplotlib hist API, see API_CHANGES.

Manuel

G Jones wrote:

···

Hello,
I am using r5186 from the SVN with numpy 1.1.0.dev5077. When I try
hist(rand(512),arange(-128,127))
I get:
---------------------------------------------------------------------------
<type 'exceptions.TypeError'> Traceback (most recent call last)

/home/gej/casper_work/backend/qtSpec/src/<ipython console> in <module>()

/usr/lib/python2.5/site-packages/matplotlib/pyplot.py in hist(*args, **kwargs)
   1688 hold(h)
   1689 try:
-> 1690 ret = gca().hist(*args, **kwargs)
   1691 draw_if_interactive()
   1692 except:

/usr/lib/python2.5/site-packages/matplotlib/axes.py in hist(self, x,
bins, normed, cumulative, bottom, histtype, align, orientation, width,
log, **kwargs)
   5472 if not self._hold: self.cla()
   5473 n, bins = np.histogram(x, bins, range=None,
-> 5474 normed=bool(normed), new=True)
   5475
   5476 if cumulative:

<type 'exceptions.TypeError'>: histogram() got an unexpected keyword
argument 'new'

I guess the new keyword argument has been deprecated?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options