x = [2D_matrix] # To convert from a 2-D to 3-D
# or
x = [[[value1]]] # To convert from a 1-D to 3-D
> a = np.ones((100, 100, 6))
> b = np.dstack([a, np.zeros([100, 100, 2])])
> b.shape
(100, 100, 8)
> b
array([[[1, 1, 1, ..., 1, 0, 0],
[1, 1, 1, ..., 1, 0, 0],
[1, 1, 1, ..., 1, 0, 0],
...