How can I stack multiple shape=(32, 32, 1) np.arrays to get a shape=(n, 32, 32, 1) np.arrays whitout using lists? The following example I did using lists but I believe there is a way to do that using only numpy.
paddings = tf.constant([[2, 2,], [2, 2], [0, 0]])
arr_1 = np.array(tf.pad(X_train[0], paddings, "CONSTANT")) # arr_1 shape=(32, 32, 1)
arr_2 = np.array(tf.pad(X_train[1], paddings, "CONSTANT")) # arr_2 shape=(32, 32, 1)
matrix = []
matrix.append(arr_1)
matrix.append(arr_2)
matrix = np.array(matrix)
print(type(arr_1)) # matrix shape=(2, 32, 32, 1) but how to do that whitout lists?