[Numpy-discussion] numarray repackaging one more time...

Francesc Alted falted at openlc.org
Wed May 14 02:46:03 EDT 2003

A Dimecres 14 Maig 2003 09:24, Gerard Vermeulen va escriure:
> I like the idea, because it would mean that I can release my PyQwt
> plot package so that it can be build for Numeric and numarray
> on the same system. It reduces the risk of calling 'PyQwt for numarray'
> functions with 'Numeric arrays' as arguments and vice-versa (for me it
> seems to work, but it scares me to death).

I think this is not necessary as you can always distinguish if the user is
passing a numarray or Numeric object, like in:

In [3]: a=Numeric.array([1,2])

In [4]: b=numarray.array([1,2])

In [5]: type(a)
Out[5]: <type 'array'>

In [6]: type(b)
Out[6]: <class 'numarray.NumArray'>

It's just a check before accessing the object.


Francesc Alted

More information about the NumPy-Discussion mailing list