[Numpy-discussion] ndarray sub-classing and append function

Prashant Saxena animator333@yahoo....
Sat Mar 31 01:25:46 CDT 2012


Hi,

I am sub-classing numpy.ndarry for vector array representation. The append function is like this:

    def append(self, other):
       self = numpy.append(self, [other], axis=0)

Example:
vary = VectorArray([v1, v2])
#vary = numpy.append(vary, [v1], axis=0)
vary.append(v1)

The commented syntax (numpy syntax) is working but "vary.append(v1)" is not working.

Any help?

Cheers

Prashant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120331/4c3db35f/attachment-0001.html 


More information about the NumPy-Discussion mailing list