I am doing some image processing in Python. I have a set of grey scale images (512 x 512) saved in a stacked .tif file with 201 images. When I open this file with skimage.io.imread, it generates a 3D array with dimensions [201, 512, 512], allowing me to easily iterate over each greyscale image - which is what I desire.
After performing some operations on these images, I have a list of ten 2D arrays, which I want to put back into the same dimension format that skimage.io.imread produced - ie. [10, 512, 512].
Using numpy.dstack produces an array with dimension [512, 512, 10]. And numpy.concatenate does not do the job either.
How can I turn this list of 2D arrays into a 3D array with the dimensions specified above?