import numpy as np
np.matrix('1, 2; 3, 4')
#1, 2
#3, 4
np.matrix([[1,2],[3,4]])
#1, 2
#3, 4
import numpy as np
np.matrix('1, 2; 3, 4')
#1, 2
#3, 4
np.matrix([[1,2],[3,4]])
#1, 2
#3, 4
转载于:https://www.cnblogs.com/KennyRom/p/6607589.html