[Numpy-discussion] coercion for array-like objects for ufuncs

Travis Oliphant oliphant at ee.byu.edu
Wed Sep 5 12:40:02 EDT 2001


> Is there a way I can effect this coercion?  I guess I'd prefer not to
> have to inherit from UserArray.

You need to have an __array__ method defined in your class which returns
the NumPy array to operate on.

-Travis






More information about the NumPy-Discussion mailing list