Robert Dailey wrote: > The > interpreter outputs: > "ValueError: shape mismatch: objects cannot be broadcast to a single > shape"
You need to post your actually input and output. The above works fine for me, just as you'd expect: >>> A = N.array([2,3,4]) >>> B = N.array([5,6,7]) >>> S = 5 >>> A+B*S array([27, 33, 39]) # I like to be explicit about order of operations, though: >>> A+(B*S) array([27, 33, 39]) -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
