[Numpy-discussion] Unexpected output using numpy.ndarray and __radd__

2006-12-19 Thread Mark Hoffmann
ython 2.4.4c1 and numpy 1.0. I tried the programme using an older version of Python and numpy and there the result of "c+a" and "a+c" are identical. Regards, Mark Hoffmann ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Unexpected output usingnumpy.ndarray and__radd__

2006-12-18 Thread Mark Hoffmann
and__radd__ Mark Hoffmann wrote: > I appreciate the answer and the solution suggestion. I see that it is > possible to make a work around by subclassing from ndarray. Still, in the > "print a+c" statement, I don't understand why a.__add__(c) doesn't return > NotImplem

Re: [Numpy-discussion] Unexpected output using numpy.ndarray and__radd__

2006-12-18 Thread Mark Hoffmann
inal Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stefan van der Walt Sent: 18. december 2006 10:36 To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Unexpected output using numpy.ndarray and__radd__ Hi Mark On Mon, Dec 18, 2006 at 08:30:20AM +0100, Ma

[Numpy-discussion] Unexpected output using numpy.ndarray and __radd__

2006-12-17 Thread Mark Hoffmann
gt; > I expected the output of "c+a" and "a+c" to be identical, however, the > output of "a+c" gets nested in an elementwise fashion. Can anybody > explain this? Is it a bug or a feature? I'm using Python 2.4.4c1 and > numpy 1.0. I tried the progra