I have a (w,h) np array in 2d. I want to make a 3d dimension that has a value greater than 1 and copy its value over along the 3rd dimensions. I was hoping broadcast would d
Better helpful in converting gray a-channel matrix into 3 channel matrix.
img3 = np.zeros((gray.shape[0],gray.shape[1],3)) img3[:,:,0] = gray img3[:,:,1] = gray img3[:,:,2] = gray fig = plt.figure(figsize = (15,15)) plt.imshow(img3)