符合矩陣乘法的函數或運算符:
np.dot, np.matmul, @
>>> a = np.random.randint(4, size=(3,4))
>>> a
array([[3, 0, 2, 0],
[1, 2, 2, 1],
[1, 2, 2, 3]])
>>> b = np.random.randint(4, size=(4,3))
>>> np.matmul(a, b)
array([[15, 11, 12],
[15, 12, 15],
[15, 18, 17]])
>>> np.dot(a,b)
array([[15, 11, 12],
[15, 12, 15],
[15, 18, 17]])
>>> a @ b
array([[15, 11, 12],
[15, 12, 15],
[15, 18, 17]])
>>>