[Numpy-discussion] numarray zeros - keyword argument'typecode'

Sebastian Haase haase at msg.ucsf.edu
Mon Dec 8 14:28:06 EST 2003


I just realized that
import numarray as na
and
from numarray import numeric as na

actually just differ in the definition of zeros() (and 3 other calls)

Hopefully I was the only one who missed this difference.
I thought that since numarray 0.5 everything was now in sub-packages and the
second way of doing the import was now the suggested one ...
Now I think otherwise and it makes all sense again.

Regards,
Sebastian Haase




> On Tue, 2003-12-02 at 19:44, Sebastian Haase wrote:
> > Hi,
> > I'm just trying to debug some PyOpenGl stuff . It seems that this is
only
> > available with Numeric (no numarray !?)
> >
> > Drawing a 60000 vertex array takes 6 sec ( should be much less than 0.5
sec
> > !! )
> > I found this is because all my other code is using numarray and it is
this
> > conversion that takes so long.
> > Switching to Numeric (and back to numarray) got this error message:
> > [[[ Num  is here numarray !! ]]
> > self.m_histPlotArray = Num.zeros((n,2), typecode=Num.Float32)
> > TypeError: zeros() got an unexpected keyword argument 'typecode'
>
> numarray is still weak in a few places for keyword names.  Try 'type'
> instead.
>
> Todd
> >
> > I thought numarray  suppossed to be backwards compatible ... so I just
> > report this as a bug.
> >
> > Regards,
> > Sebastian
> >





More information about the NumPy-Discussion mailing list