[Numpy-discussion] matrix <-> ndarray bug

dmitrey dmitrey.kroshko@scipy....
Thu Jan 31 09:35:24 CST 2008


I don't know, maybe it's already fixed in more recent versions?

 >>> from numpy import *
 >>> a=mat('1  2')
 >>> b = asfarray(a).flatten()
 >>> print b[0]
[[ 1.  2.]]

# ^^ I expected getting 1.0 here

 >>> numpy.version.version
'1.0.3'


More information about the Numpy-discussion mailing list