<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" size=3>Executing the
following code has the side effect of modifying one of the arguments (matrices)
I passed to matrixmultiply. Note that the matrix m2 changes after the call to
matrixmultiply. This is on Windows with numarray 1.0. <BR><BR>Why does this
happen?<BR><BR>Code:<BR><BR>from numarray import array, matrixmultiply<BR><BR>m1
= array(<BR>[[ 1., 0., 0.],<BR>[ 0., 1., 0.],<BR>[ 0., 0., 1.]]<BR>)<BR><BR>m2 =
array(<BR>[[ 0.500011, 0.86601905, 0. ],<BR>[-0.86601905, 0.500011, 0. ],<BR>[
0., 0., 1. ]]<BR>)<BR><BR>print "m1 before\n", m1<BR>print "m2 before\n",
m2<BR>matrixmultiply(m1, m2)<BR>print "m1 after\n", m1<BR>print "m2 after\n",
m2<BR><BR>Output:<BR><BR>m1 before<BR>[[ 1. 0. 0.]<BR>[ 0. 1. 0.]<BR>[ 0. 0.
1.]]<BR>m2 before<BR>[[ 0.500011 0.86601905 0. ]<BR>[-0.86601905 0.500011 0.
]<BR>[ 0. 0. 1. ]]<BR>m1 after<BR>[[ 1. 0. 0.]<BR>[ 0. 1. 0.]<BR>[ 0. 0.
1.]]<BR>m2 after<BR>[[ 0.500011 -0.86601905 0. ]<BR>[ 0.86601905 0.500011 0.
]<BR>[ 0. 0. 1. ]]</FONT><BR><BR><BR><BR></FONT></DIV></BODY></HTML>