sup3r.preprocessing.base.Container#
- class Container(data: Sup3rX | Sup3rDataset | Tuple[Sup3rX, ...] | Tuple[Sup3rDataset, ...] | Dict[str, Sup3rX] | Dict[str, Sup3rDataset] | None = None)[source]#
Bases:
objectBasic fundamental object used to build preprocessing objects. Contains an xarray-like Dataset (
Sup3rX), wrapped tuple ofSup3rXobjects (Sup3rDataset), or a tuple of such objects.- Parameters:
data (Union[Sup3rX, Sup3rDataset, Tuple[Sup3rX, …],) – Tuple[Sup3rDataset, …] Can be an
xr.Dataset, aSup3rXobject, aSup3rDatasetobject, or a tuple of such objects.Note
.datawill return aSup3rDatasetobject or tuple of such. This is a tuple when the .data attribute belongs to aCollectionobject likeBatchHandler. Otherwise this isSup3rDatasetobject, which is either a wrapped 3-tuple, 2-tuple, or 1-tuple (e.g.len(data) == 3,len(data) == 2orlen(data) == 1). This is a 3-tuple when.databelongs to a container object likeDualSamplerWithObs, a 2-tuple when.databelongs to a dual container object likeDualSampler, and a 1-tuple otherwise.
Methods
post_init_log([args_dict])Log additional arguments after initialization.
wrap(data)Return a
Sup3rDatasetobject or tuple of such.Attributes
- property data#
Return underlying data.
- Returns:
See also
- wrap(data)[source]#
Return a
Sup3rDatasetobject or tuple of such. This is a tuple when the.dataattribute belongs to aCollectionobject likeBatchHandler. Otherwise this isSup3rDatasetobject, which is either a wrapped 3-tuple, 2-tuple, or 1-tuple (e.g.len(data) == 3,len(data) == 2orlen(data) == 1). This is a 3-tuple when.databelongs to a container object likeDualSamplerWithObs, a 2-tuple when.databelongs to a dual container object likeDualSampler, and a 1-tuple otherwise.
- property shape#
Get shape of underlying data.