[SciPy-user] Re: [SciPy-dev] matrixmultiply()
David Grant
david.grant at telus.net
Sat Apr 9 14:23:29 EDT 2005
Robert Kern wrote:
> David Grant wrote:
>
>> Can anyone tell me why the * operation on matrices is for element-wise
>> multiplcation and not matrix multiplication for Numeric/numpy arrays?
>
>
> Not everyone is using Numeric for linear algebra on matrices.
> Element-wise multiplication is the most consistent interpretation for
> * in this general-purpose context.
>
> Sine you *are* doing linear algebra on matrices, you can use Matrix
> objects, which do define the * operator to be matrix multiplication.
>
>
Cool, I found the Matrix object you talk about hidden in the Numeric
documentation.
What if I start by declaring my arrays using zeros() and ones(), do I
have to pass it through mat()? That seems like a rather annoying second
step.
--
David J. Grant
http://www.davidandnasha.ca
More information about the SciPy-User
mailing list