python 二维数组 转 矩阵

 

x = numpy.array([[1,2,3],[4,5,6],[7,8,9]])
print x
print x.shape

输出

[[1 2 3]
 [4 5 6]
 [7 8 9]]
(3L, 3L)
[Finished in 0.2s]

 

转载于:https://www.cnblogs.com/sea-stream/p/10801261.html

你可能感兴趣的:(python)