[SciPy-user] unexpected matrix behavior
Alan G Isaac
aisaac at american.edu
Thu Dec 15 21:59:25 EST 2005
I would like to understand the behavior of matrices,
as shown below. Is it expected? If so, what is the
general principle?
Thank you,
Alan Isaac
>>> scipy.base.__version__
'0.8.4'
>>> x = [[1,2],[3,4]]
>>> y = scipy.array(x)
>>> z = scipy.mat(x)
>>> xz = zip(*x)
>>> yz = zip(*y)
>>> zz = zip(*z)
>>> xz
[(1, 3), (2, 4)]
>>> yz
[(1, 3), (2, 4)]
>>> zz
[(matrix([[1, 2]]), matrix([[3, 4]]))]
More information about the SciPy-User
mailing list