1c = np.array([[4, 3], [2, 1]])
2d = np.array([[1, 2], [3, 4]])
3print(c*d)
4# [[4 6]
5# [6 4]]
1import numpy as np
2
3a = np.mat('4 3; 2 1')
4b = np.mat('1 2; 3 4')
5print(a)
6# [[4 3]
7# [2 1]]
8print(b)
9# [[1 2]
10# [3 4]]
11print(a*b)
12# [[13 20]
13# [ 5 8]]
1import numpy as np
2
3a = np.array([[4, 3], [2, 1]])
4b = np.array([[1, 2], [3, 4]])
5print(a@b)
6# [[13 20]
7# [ 5 8]]