transformation_matrix = np.random.rand(9).reshape(3, 3)
z = np.empty_like(rgb_image)
for x in range(rgb_image.shape[0]):
    for y in range(rgb_image.shape[1]):
        pass
Numpy 3d array map operation