[Numpy-discussion] numarray bug: dot product between 2x2 and 3x2x3 on Mac different from PC

Sebastian Haase haase at msg.ucsf.edu
Mon Jul 17 11:40:48 CDT 2006


Hi!
This is what I got:
>>> import numarray as na
>>> na.__version__
'1.4.0'
>>>bbb=na.zeros((2,3,3), naFloat32)
>>>bbb[0,:,:]=1
>>>bbb[1,:,:]=2
>>>ccc=na.transpose(bbb,(1,0,2))
>>>d=na.array([[1,0],[0,1]])
>>>na.dot(d,ccc)
[[[ 1.  1.  1.]
  [ 1.  1.  1.]
  [ 1.  1.  1.]]

 [[ 2.  2.  2.]
  [ 2.  2.  2.]
  [ 2.  2.  2.]]]

This is on a PC (Windows or Linux):

But if you do the same thing on Mac, the result will be:
[[[ 1. 1. 1.]
  [ 2. 2. 2.]
  [ 1. 1. 1.]]

 [[ 2. 2. 2.]
  [ 1. 1. 1.]
  [ 2. 2. 2.]]]

Can someone confirm this ?
(the new numpy on windows also gives the first result)

Thanks,
Sebastian Haase




More information about the Numpy-discussion mailing list