I want to make a video from array which shape is (70000, 640, 480, 3). the first axis is the number of photos which I want to collect them into a video without using loops to append each photo .
Asked
Active
Viewed 164 times
1 Answers
0
You can create a 4-dimensional empty numpy array first, and then set the values later on
import numpy as np
videos = np.zeros(shape=(70000, 640, 480, 3))
videos[60000][300][200][1] = 300 # set values later when needed

Paul Lo
- 6,032
- 6
- 31
- 36