[Numpy-discussion] Matrix times scalar is wacky

Sven Schreiber svetosch at gmx.net
Wed Mar 8 09:00:08 EST 2006


Travis Oliphant schrieb:
> Bill Baxter wrote:
> 
>> 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'
>>
> This should be fixed in SVN.
> 
>
I have just been bitten by this bug, so I would like to ask when to
expect the next release. And/or are there any workarounds?

Thanks,
Sven




More information about the NumPy-Discussion mailing list