[Numpy-discussion] Subclassing ndarray in C: getitem ?

Pierre GM pgmdevlist at gmail.com
Mon Jul 26 12:58:18 EDT 2010


All,
I'm teaching myself how to subclass ndarrays in C (not in Cython, just plain C). It's slowly coming together, but I'm now running into a problem: I need to overwrite __getitem__ and I'm not sure how to do it. I was thinking about using my own function instead of array_as_mapping.mp_subscript, but how do I import array_as_mapping in the first place ? And is it really the way to go ?
Any pointer appreciated...
P.


More information about the NumPy-Discussion mailing list