SyntaxFix
Write A Post
Hire A Developer
Questions
You're asking how to add a dimension to a NumPy array, so that that dimension can then be grown to accommodate new data. A dimension can be added as follows:
image = image[..., np.newaxis]