Subclassing Numeric arrays.
Lukasz Pankowski
lupan at zamek.gda.pl
Wed Oct 15 03:46:26 EDT 2003
Jacek Generowicz <jacek.generowicz at cern.ch> writes:
> [...]
> Now, there is also a UserArray module in the Numeric distribution,
> which, supposedly provides a subclassable analogue of the Numeric
> arrays. But attempts to subclass it give an identical error message.
>
> So, what am I missing ?
I suppose you subclassed UserArray.array which is the same function as
Numeric.array. Subclassing UserArray.UserArray works:
>>> import UserArray
>>> class MyArray(UserArray.UserArray): pass
...
>>>
>>> import Numeric
>>> UserArray.array is Numeric.array
True
--
=*= Lukasz Pankowski =*=
More information about the Python-list
mailing list