import numpy as np left = np.array( [ [2, 1, 3], [0, 4, 5], ] ) right = np.array( [ [1, 2], [3, 0], [4, 1], ] )