mpi4py.MPI.Pickle

class mpi4py.MPI.Pickle(dumps=None, loads=None, protocol=None, threshold=None)

Bases: object

Pickle/unpickle Python objects

Parameters
  • dumps (Optional[Callable[[Any, int], bytes]]) –

  • loads (Optional[Callable[[Buffer], Any]]) –

  • protocol (Optional[int]) –

  • threshold (Optional[int]) –

__init__(dumps=None, loads=None, protocol=None, threshold=None)
Parameters
Return type

None

Methods Summary

dumps(obj)

Serialize object to pickle data stream.

dumps_oob(obj)

Serialize object to pickle data stream and out-of-band buffers.

loads(data)

Deserialize object from pickle data stream.

loads_oob(data, buffers)

Deserialize object from pickle data stream and out-of-band buffers.

Attributes Summary

PROTOCOL

protocol version

THRESHOLD

out-of-band threshold

Methods Documentation

dumps(obj)

Serialize object to pickle data stream.

Parameters

obj (Any) –

Return type

bytes

dumps_oob(obj)

Serialize object to pickle data stream and out-of-band buffers.

Parameters

obj (Any) –

Return type

Tuple[bytes, List[memory]]

loads(data)

Deserialize object from pickle data stream.

Parameters

data (Buffer) –

Return type

Any

loads_oob(data, buffers)

Deserialize object from pickle data stream and out-of-band buffers.

Parameters
Return type

Any

Attributes Documentation

PROTOCOL

protocol version

THRESHOLD

out-of-band threshold