Source code for implementations.problem_classes.boussinesq_helpers.unflatten
import numpy as np
[docs]
def unflatten(uin, dim, Nx, Nz):
temp = np.asarray(np.split(uin, dim))
uout = np.zeros((dim, Nx, Nz))
for i in range(0, dim):
uout[i, :, :] = np.split(temp[i, :], Nx)
return uout