def unblockshaped(arr, h, w):
n, nrows, ncols = arr.shape<EOL>return (arr.reshape(h // nrows, -<NUM_LIT:1>, nrows, ncols)<EOL>.swapaxes(<NUM_LIT:1>, <NUM_LIT:2>)<EOL>.reshape(h, w))<EOL>
Return an new array of shape (h, w) where
h * w = arr.size

If arr is of shape (n, nrows, ncols), n sublocks of shape (nrows, ncols),
then the returned array preserves the "physical" layout of the sublocks.