unienv_interface.remote.codec¶
Portable v1 binary envelope. No Python object deserialization is performed.
CodecError
¶
Bases: ValueError
A value or envelope cannot be represented by the v1 codec.
Codec
¶
Codec(max_message_size: int = DEFAULT_MAX_MESSAGE_SIZE)
Encode a tagged value tree and contiguous binary attachments.
Limits apply to the whole envelope, on both send and receive. Arrays decode to independently owned NumPy memory; clients may subsequently map backends.
map_arrays
¶
map_arrays(value: Any, backend: ComputeBackend, device: Optional[object] = None) -> Any
Copy received arrays into the chosen local compute backend.