[Numpy-discussion] __array_wrap__
Neal Becker
ndbecker2@gmail....
Tue Sep 29 13:55:44 CDT 2009
This seems to work now, but I'm wondering if Charles is correct, that
inheritance isn't such a great idea here.
The advantage of inheritance is I don't have to implement forwarding all the
functions, a pretty big advantage. (I wonder if there is some way to do some
of these as a generic 'mixin'?)
I was concerned that using a vectorize function in __array_wrap__ would
result in a recursive call to __array_wrap__ (and in some earlier version I
did get infinite recursion). This version doesn't seem to have a problem,
although I don't know why.
Any thoughts? Code attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_fixed_numpy.py
Type: text/x-python
Size: 5909 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090929/43c69a57/attachment.py
More information about the NumPy-Discussion
mailing list