xxxxxxxxxx
# For 2-D array, it is matrix multiplication
import numpy.matlib
import numpy as np
a = [[1,0],[0,1]]
b = [[4,1],[2,2]]
print np.matmul(a,b)
xxxxxxxxxx
import numpy as np
arr = np.array([[1, 2, 3], [4, 5, 6]])
arr2 = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
multiplied = arr.dot(arr2)
print(multiplied)
"""
The columns on the arr must be the same
for the rows in arr2 otherwise it will
raise an exception
"""