mpi4py.util.dtlib

Added in version 3.1.0.

The mpi4py.util.dtlib module provides converter routines between NumPy and MPI datatypes.

mpi4py.util.dtlib.from_numpy_dtype(dtype)

Convert NumPy datatype to MPI datatype.

Parameters:

dtype (DTypeLike) – NumPy dtype-like object.

Return type:

Datatype

mpi4py.util.dtlib.to_numpy_dtype(datatype)

Convert MPI datatype to NumPy datatype.

Parameters:

datatype (Datatype) – MPI datatype.

Return type:

dtype[Any]