mpi4py.util.dtlib — MPI for Python 3.1.4 documentation

# mpi4py.util.dtlib

New 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 (numpy.typing.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:

    numpy.dtype