I know matrix will call the dot function of ndarray. However, that will not
give the answer we expect. A 5*5 matrix multiplies another matrix, we
expect answer to be error or a 5*? matrix, not a 1*5 matrix.

As ticket 2649 said, I * I * x or I.dot(I.dot(x)) should be as same as I *
x. But it will return an error because I and I.dot(x) are not aligned.



On Wed, Apr 3, 2013 at 2:50 PM, Alan G Isaac <[email protected]> wrote:

> On 4/3/2013 2:44 PM, [email protected] wrote:
> > I suggest add function dot to matrix
>
>  >>> import numpy as np; x = np.arange(5); I = np.asmatrix(np.identity(5));
>  >>> I.dot(x)
> matrix([[ 0.,  1.,  2.,  3.,  4.]])
>
>
> Alan Isaac
>
> _______________________________________________
> NumPy-Discussion mailing list
> [email protected]
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>



-- 
Kan Huang
Department of Applied math & Statistics
Stony Brook University
917-767-8018
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to