NumPy(Numerical Python) 是 Python 语言的一个扩展程序库,支持大量的维度数组与矩阵运算,此外也针对数组运算提供大量的数学函数库。
import numpy
a = numpy.array([[1,2,3],[4,5,6],[7,8,9]])#建立矩阵
print (a)
输出结果
[[1 2 3]
[4 5 6]
[7 8 9]]

posted on 2019-12-23 18:06  准风璧谈  阅读(107)  评论(0编辑  收藏  举报