SharedArray#

class streaming.base.shared.SharedArray(shape, dtype, name)[source]#

A numpy array of predetermined shape and dtype that lives in shared memory.

Parameters
  • shape (Union[int, Tuple[int]]) – Shape of the array.

  • dtype (type) – Dtype of the array.

  • name (str) – Its name in shared memory.

numpy()[source]#

Get as a numpy array.

We can’t just internally store and use this numpy array shared memory wrapper because it’s not compatible with spawn.