import numpy as np#https://www.cnblogs.com/xzcfightingup/p/7598293.htmla = np.zeros((2,3),dtype=int)...a = np.ones((2,3),dtype=int) a = np.eye(3)#3维单位矩阵a = np.empty([2,3],dtype=int)a = np.random.randint(0..., 10, (4,3))y = np.array([4, 5, 6])np.diag(y)#以y为主对角线创建矩阵a = np.arange(0, 30, 2)# start at 0 count up