2010-12-15 14:16, liji.ma...@gmail.com skrev:
import numpy as np
A = np.mat([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
print A[:, 1].shape
for i in range(0, 3):
print A[:, i].shape
the result is
(1, 3)
(3, 1)
(3, 1)
(3, 1)
Works for me...
jo...@johan-laptop:~$ cat test.py
import numpy as np
A = np.mat([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
print A[:, 1].shape
for i in range(0, 3):
print A[:, i].shape
jo...@johan-laptop:~$ python test.py
(3, 1)
(3, 1)
(3, 1)
(3, 1)
Python 2.6.6 and Numpy 1.4.1 from debian testing.
/ johan
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org