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

Prashant Saxena animator333 at yahoo.com
Sat Mar 31 02:25:46 EDT 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.python.org/pipermail/numpy-discussion/attachments/20120331/4c3db35f/attachment.html>


More information about the NumPy-Discussion mailing list