[Numpy-discussion] Matrix times scalar is wacky

Bill Baxter wbaxter at gmail.com
Fri Feb 24 01:04:03 CST 2006


Multiplying a matrix times a scalar seems to return junk for some reason:

>>> A = numpy.asmatrix(numpy.rand(1,2))
>>> A
matrix([[ 0.30604211,  0.98475225]])
>>> A * 0.2
matrix([[  6.12084210e-002,   7.18482614e-290]])
>>> 0.2 * A
matrix([[  6.12084210e-002,   7.18482614e-290]])
>>> numpy.__version__
'0.9.5'


--billyb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20060224/432207b1/attachment.html 


More information about the Numpy-discussion mailing list