py21cmfast.wrapper.arrays.ArrayProxy

class py21cmfast.wrapper.arrays.ArrayProxy(name: str)

Exposes an OutputStruct’s Array field as a plain numpy array.

The Array itself is stored in a private attrs field (_<name>) and remains reachable via OutputStruct.arrays[<name>], which is where the memory-management API lives. Reading the public attribute gives you the data, loading it from disk first if it has been purged.

Whether that load is kept is governed by config[“CACHE_ARRAYS_ON_ACCESS”]: by default the loaded data is cached back onto the struct, so repeated access is cheap; with it disabled, each access re-reads from disk and nothing is retained. Either way the read is logged at DEBUG level, so unexpected memory growth or repeated disk traffic is traceable.

Parameters:

name (str)

private
public