xdas.atoms.DownSample#
- class xdas.atoms.DownSample(factor, dim='last')[source]#
Stateful integer downsampling by selecting every factor-th sample.
- Parameters:
Methods
__init__(factor[, dim])call(da, **flags)Downsample da, buffering the trailing partial stride when chunked.
initialize(da[, chunk_dim])Initialise the carry-over buffer for chunked operation.
initialize_from_state()Initialise the atom from its current state.
load_state(path)Load the atom state from the NetCDF4 file at path.
reset()Reset all state entries to
...(uninitialised sentinel).save_state(path)Serialise the current state to a NetCDF4 file at path.
set_state(state)Restore the atom state from a previously saved state dict.
Attributes
initializedTrueif every state key has been initialised (no...sentinels remain).stateDict of the current state, including nested atom states.