Last active
July 28, 2020 13:59
-
-
Save nimpy/cfe51b3e30b7817d1c043c8614cc32f1 to your computer and use it in GitHub Desktop.
Making 3 channel image by stacking a 1 channel image three times
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
image_3ch = np.repeat(image_1ch, 3, axis=1).reshape((image_1ch.shape[0], image_1ch.shape[1], 3)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment