I have three matrices, R, B, G, which all are the same in size, say m*n. I want to stack all three of them together into a different channel of a new matrix (3*m* n or m*n*3), as implemented in Matlab:
A(:,:,1) = R
A(:,:,2) = G
A(:,:,3) = B
How do I achieve this efficiently in Python?