import numpy as np

flat = np.arange(6)
print(flat)

grid = flat.reshape(2, 3)
print(grid)
print(grid.shape)

[0 1 2 3 4 5]
[[0 1 2]
 [3 4 5]]
(2, 3)