python 二维数组 转 矩阵

时间:2019-05-02 00:00:39   收藏:0   阅读:422

 

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!