[Numpy-discussion] one-offset arrays
Tim Hochberg
tim.hochberg at ieee.org
Thu Aug 30 10:07:48 CDT 2001
This is just a followup to my earlier message.
The getitem issues I identify there are fixed in Python 2.2, if you use new
style class (inherit from object). So, problems 1-3 can be fixed in Python
2.2. It seems that problem 4 could be fixed fairly easily in the python
layer by writing wrapper functions in Numeric.py. For example:
def cos(a):
r = umath.cos(a)
if isinstance(a, UserArray):
r = a.__class__(r)
return r
This would be potentially a bit tedious, but straightforward.
-tim
More information about the Numpy-discussion
mailing list