pynbody.array.array_factory

Contents

pynbody.array.array_factory#

pynbody.array.array_factory(dims: int | tuple, dtype: dtype, zeros: bool, shared: bool) SimArray[source]#

Create an array of dimensions dims with the given numpy dtype.

Parameters:
  • dims (int or tuple) – The dimensions of the array.

  • dtype (numpy.dtype) – The data type of the array.

  • zeros (bool) – If True, the array is guaranteed to be zeroed.

  • shared (bool) – If True, the array uses shared memory and can be efficiently shared across processes.