Is numarray matrixmultiply supposed to transpose the second argument?

Raoul meuldijk at jupiterisbig.yahoo.com
Mon Jul 19 03:54:42 EDT 2004


It appears that matrixmultiply(A,B) has a side-effect of transposing the
second argument (B).
Is this supposed to happen?
Is there anyway to prevent it from transposing?

This shows what happens:


#! /usr/bin/env python
from numarray import *

A=array([[350],
     [370],
     [510],
     [490],
     [500]])

B=array([[35,37,51,49,50]])

print "A and B before matmul:"
print A
print B

AB=matrixmultiply(A,B)

print "AxB, A, B, after matmul:"
print AB
print A
print B

print"Apparantly, the second argument of matrixmultiply(A,B) is always
transposed."
------------ And now a word from our sponsor ----------------------
For a quality mail server, try SurgeMail, easy to install,
fast, efficient and reliable.  Run a million users on a standard
PC running NT or Unix without running out of power, use the best!
----  See http://netwinsite.com/sponsor/sponsor_surgemail.htm  ----



More information about the Python-list mailing list