一.矩阵生成 1.numpy.matrix: import numpy as np x = np.matrix([ [1, 2, 3],[4, 5, 6] ]) y = np.matrix( [1, 2, 3, 4, 5, 6]) print(x, y, x[0, 0], sep='\n\n') matrix([[1, 2, 3] [4, 5, 6]]) [[1 2 3 4 5 6]] 1 [[1 2 3]] 2.numpy.matlib.empty( shape, dtype, order)…