diff --git a/pyspod/utils/parallel.py b/pyspod/utils/parallel.py index beb6587..8733498 100644 --- a/pyspod/utils/parallel.py +++ b/pyspod/utils/parallel.py @@ -161,7 +161,7 @@ def _blockdist(N, size, rank): def allreduce(data, comm): if comm is not None: MPI = _get_module_MPI(comm) - data = data.newbyteorder('=') + data = data.view(data.dtype.newbyteorder('=')) data_reduced = np.zeros_like(data) comm.Barrier() comm.Allreduce(data, data_reduced, op=MPI.SUM)