The data is flattened to be splitted among processes and thus, the resulting arrays are flattened. The reshape is needed for all arrays, before it was done in 2 step. 1 - memmap to array, 2- reshape of the array. I found it more clear to combine the 2.