redistribute#

caput.mpiarray.MPIArray.redistribute(axis: int) MPIArray[source]#

Change the rank distribution axis of the array.

Guarantees that the result is c-contiguous.

Parameters:
axisint

Axis to distribute over.

Returns:
redistributed_arrayMPIArray

MPIArray instance of the original array, distributed over the new axis. If the new axis is the same as the old axis, the original array is returned.

Raises:
MemoryError

If there is not enough memory to perform the redistribution.