Subclassing Numeric arrays.
lupan at zamek.gda.pl
Wed Oct 15 09:46:26 CEST 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
=*= Lukasz Pankowski =*=
More information about the Python-list