Python class
SharedMemoryArray
SharedMemoryArrayβ
class max.interfaces.SharedMemoryArray(name, shape, dtype)
Bases: object
A wrapper for a NumPy array stored in shared memory.
This class is used as a placeholder in pixel_values during serialization.
It will be encoded as a dict with __shm__ flag and decoded back to a NumPy
array.
dtypeβ
dtype: str
The NumPy dtype string of the array (for example, <f4 for float32).
nameβ
name: str
The unique name of the shared memory segment.
shapeβ
The shape of the NumPy array stored in shared memory.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!