Is numarray matrixmultiply supposed to transpose the secondargument?

Raoul Meuldijk meuldijk at jupiterisbig.yahoo.com
Mon Jul 19 11:18:26 EDT 2004


> 
> This works for me (B before == B after).  Which version of numarray are 
> you using?
> 

It's version 1.0, on Python 2.3+.
I do have one lengthy example where the second argument was not changed 
(on one matmul, all the others in that example did transpose), but was 
not able to reproduce that in a small example; so it seems not to be 
consistent.

For completeness, here's my output, as you can see the row-vector B has 
changed into a column-vector.

A and B before matmul:
[[350]
  [370]
  [510]
  [490]
  [500]]
[[35 37 51 49 50]]
AxB, A, B, after matmul:
[[12250 12950 17850 17150 17500]
  [12950 13690 18870 18130 18500]
  [17850 18870 26010 24990 25500]
  [17150 18130 24990 24010 24500]
  [17500 18500 25500 24500 25000]]
[[350]
  [370]
  [510]
  [490]
  [500]]
[[35]
  [37]
  [51]
  [49]
  [50]]
Apparantly, the second argument of matrixmultiply(A,B) is always transposed.



More information about the Python-list mailing list