[Numpy-discussion] strange multiplication behavior with numpy.float64 and ndarray subclass
Wed Jan 21 11:05:23 CST 2009
On Wed, Jan 21, 2009 at 11:43 AM, Pierre GM <email@example.com> wrote:
> On Jan 21, 2009, at 11:34 AM, Darren Dale wrote:
> > I have a simple test script here that multiplies an ndarray subclass
> > with another number. Can anyone help me understand why each of these
> > combinations returns a new instance of MyArray:
> > mine = MyArray()
> > print type(np.float32(1)*mine)
> > print type(mine*np.float32(1))
> > print type(mine*np.float64(1))
> > print type(1*mine)
> > print type(mine*1)
> > but this one returns a np.float64 instance?
> FYI, that's the same behavior as observed in ticket #826. A first
> thread addressed that issue
> But so far, no answer has been suggested.
> Any help welcome.
I dont understand why __array_priority__ is not being respected here. Ticket
826 lists the component as numpy.ma, it seems the problem is in numpy.core.
I think the severity of the ticket should be increased. But I wasnt able to
view the ticket, I keep getting an "internal server error".
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion