py21cmfast.wrapper.arrays ========================= .. py:module:: py21cmfast.wrapper.arrays .. autoapi-nested-parse:: Module for dealing with arrays that are input/output to C functions. .. !! processed by numpydoc !! Attributes ---------- .. autoapisummary:: py21cmfast.wrapper.arrays.logger Classes ------- .. toctree:: :hidden: /autoapi/py21cmfast/wrapper/arrays/Array /autoapi/py21cmfast/wrapper/arrays/ArrayProxy /autoapi/py21cmfast/wrapper/arrays/CacheBackend /autoapi/py21cmfast/wrapper/arrays/H5Backend .. autoapisummary:: py21cmfast.wrapper.arrays.Array py21cmfast.wrapper.arrays.ArrayProxy py21cmfast.wrapper.arrays.CacheBackend py21cmfast.wrapper.arrays.H5Backend Functions --------- .. autoapisummary:: py21cmfast.wrapper.arrays.expose_arrays Module Contents --------------- .. py:function:: expose_arrays(cls: type) -> type Class decorator exposing every private `Array` field as a plain numpy array. Must be applied *outside* `attrs.define`, so that it runs once `attrs` has finished building the class:: @expose_arrays @attrs.define(slots=False, kw_only=True) class InitialConditions(OutputStruct): _hires_density = _arrayfield() Keeping the `Array` in the private field means `attrs`' generated `__repr__`, `eq` and `asdict` continue to see it, so inspecting a purged struct still never touches the disk. The public name is purely this descriptor. `attrs` strips the leading underscore for `__init__`, so `InitialConditions(hires_density=...)` is unchanged. .. !! processed by numpydoc !! .. py:data:: logger