[Numpy-discussion] isn't it a bug? (matrix multiplication)

2008-02-07 Thread dmitrey
from numpy import array a = array((1.0, 2.0)) b = c = 15 b = b*a#ok c *= a#ok d = array(15) e = array(15) d = d*a#this works ok e *= a#this intended to be same as prev line, but yields error: Traceback (innermost last): File stdin, line 1, in module ValueError: invalid return array shape

Re: [Numpy-discussion] isn't it a bug? (matrix multiplication)

2008-02-07 Thread Christopher Barker
Alan G Isaac wrote: On Thu, 07 Feb 2008, dmitrey apparently wrote: a = array((1.0, 2.0)) e = array(15) e *= a # ... yields error: You are trying to stuff in two values where you have only allocated space for 1. Exactly. but to expound a bit more: The ?= operators are in-place operators