reshape#

caput.mpiarray.MPIArray.reshape(*shape: collections.abc.Sequence[int | None], order: str = 'C') MPIArray[source]#

Reshape the array.

Must not attempt to reshape the distributed axis. That axis must be given an input length None.

Parameters:
*shapeSequence[int | None]

Sequence of axis lengths. The distributed must be given None.

orderstr, optional

Read/write index order, ignoring memory layout of underlying array. ‘C’ means C-like order, ‘F’ means Fortran-like order. ‘A’ uses Fortran order _if_ array is Fortran-contiguous in memory, and C order otherwise.

Returns:
reshaped_arrayMPIArray

Reshaped MPIArray as a view of the original data.