Reshaping Numpy arrays
I'm not sure if I fully understand what you mean, but numpy.expand_dims can be used to expand an array at the given index, allowing you to convert a 2 dimensional array to a 3 dimensional array.

import numpy as np

array = np.array([[1,2],[3,4]])
print(array.shape)
# (2, 2)
array = np.expand_dims(array, 0)
print(array.shape)
# (1, 2, 2)