__array_finalize__#

caput.mpiarray.MPIArray.__array_finalize__(obj: MPIArray | None) None[source]#

Finalizes the creation of the MPIArray, when viewed.

Note: If you wish to create an MPIArray from an ndarray, please use wrap(). Do not use ndarray.view(MPIArray).

In NumPy, ndarrays only go through the __new__ when being instantiated. For views and broadcast, they go through __array_finalize__. https://numpy.org/doc/stable/user/basics.subclassing.html#the-role-of-array-finalize

Parameters:
selfnpt.NDArray

The array which will be created

objnpt.NDArray | None

The original array being viewed or broadcast. When in the middle of a constructor, obj is set to None.