From: Francesc A. <fa...@op...> - 2003-05-14 09:45:16
|
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 i= s passing a numarray or Numeric object, like in: In [3]: a=3DNumeric.array([1,2]) In [4]: b=3Dnumarray.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. Cheers, --=20 Francesc Alted |