I have a greyscale image represented as 2D numpy array and want to make it a 3D numpy array representing a color rgb image (which is obviously still grey).
img.shape // (100, 100)
img[10, 10] // e.g. 42
// do something
img.shape // (100, 100, 3)
img[10, 10] // e.g. [42, 42, 42]
I found this question which asked the opposite: numpy 3D-image array to 2D