12 Sep
2011
12 Sep
'11
11:18 a.m.
Hello, I am sure this question has been answered before but I can't find the right search word to find it. Why does MuY += MuY.transpose() and MuY = MuY + MuY.transpose() give different answers? thanks /Jonas Wallin
12 Sep
12 Sep
11:58 a.m.
On 9/12/2011 7:18 AM, Jonas Wallin wrote:
Why does
MuY += MuY.transpose()
and
MuY = MuY + MuY.transpose()
give different answers?
Because the first one is done in-place, so you are changing MuY (and thus MuY.transpose) as the operation proceeds. MuY.transpose() is generally a *view* of MuY. http://docs.scipy.org/doc/numpy/reference/generated/numpy.transpose.html Use the second one. Alan Isaac
4609
Age (days ago)
4609
Last active (days ago)
1 comments
2 participants
participants (2)
-
Alan G Isaac
-
Jonas Wallin