|
From: Robert K. <rk...@uc...> - 2005-05-13 07:48:15
|
Chris Neff wrote: > I am trying out quiver using IPython (which I am new to so my apologies > if this is actually a IPython question) and matplotlib .80 and the > latest numeric. The code I try and the subsequent error: > > In [1]: x=ones([5,5]) > > In [2]: quiver(x,x) > --------------------------------------------------------------------------- > exceptions.TypeError Traceback (most > recent call last) > > C:\Documents and Settings\root\Desktop\<console> > > C:\Python24\Lib\site-packages\matplotlib\pylab.py in quiver(*args, **kwargs) > 2137 hold(h) > 2138 try: > -> 2139 ret = gca().quiver(*args, **kwargs) > 2140 draw_if_interactive() > 2141 except: > > C:\Python24\Lib\site-packages\matplotlib\axes.py in quiver(self, U, V, > *args, **kwargs) > 852 if do_scale: > 853 Nmax = maximum.reduce(maximum.reduce(N)) > --> 854 U *= (S/Nmax) > 855 V *= (S/Nmax) > 856 N /= Nmax > > TypeError: return array has incorrect type > > > What could be the issue? Thanks for the help. Pass in floating point arrays rather than integer arrays. quiver, on the whole, isn't terribly robust. I've been contemplating writing a replacement. quiver-users: how attached are you to this API? Personally, it fills me with a burning rage every time I think about it. -- Robert Kern rk...@uc... "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter |