pynbody.array.shared

pynbody.array.shared#

Support for numpy arrays in shared memory.

Functions

delete_dangling_shared_memory()

Ensures that all shared memory has been cleaned up.

get_num_shared_arrays_owned()

Returns the number of shared arrays currently owned by this process.

make_shared_array(dims, dtype[, zeros, ...])

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

remote_map(pool, fn, *iterables)

Equivalent to pool.map, but turns any shared memory arrays into a reference that can be passed between processes.

shared_array_remote(fn)

A decorator for functions that are expected to run on a 'remote' process, accepting shared memory inputs.

Classes

SharedMemorySimArray(data[, units, sim])

Attributes:

Exceptions

RemoteKeyboardInterrupt

SharedArrayNotFound