pynbody.array.shared.SharedArrayReference#

class pynbody.array.shared.SharedArrayReference(iterable=(), /)[source]#

Bases: tuple

A reference to an array in shared memory, which can be passed between processes.

Returned by to_shared_reference() and turned back into an array by from_shared_reference(). It describes where the memory lives and how to interpret it; it does not itself hold any of the data.

Added in version 2.7.0: Previously named _deconstructed_shared_array, which remains available as an alias.

Methods

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

__init__(*args, **kwargs)#
count(value, /)#

Return number of occurrences of value.

index(value, start=0, stop=sys.maxsize, /)#

Return first index of value.

Raises ValueError if the value is not present.