stacking arrays in python code example
Example 1: np.stack
>>> a = np.array([1, 2, 3])
>>> b = np.array([2, 3, 4])
>>> np.stack((a, b))
array([[1, 2, 3],
[2, 3, 4]])
Example 2: numpy stack in new dimension
np.stack((R_mat, G_mat, B_mat), axis = 2)
# identify any new dimension as you like