xesn.XData.subsample#
- XData.subsample(xda, mode)#
Subsample a DataArray along axes specified in
subsampling. Note that the “time” section has to have modes, e.g., indicating training, validation, or testing.Note
Each dimension can be subsampled either via indices if integers are provided, or by value if floats are provided. These types can’t be mixed for the same axis though, and no other type is supported, e.g., numpy.datetime64 or datetime.datetime, because these types can’t be specified easily in a yaml file to the Driver class, which is the main point of interaction here.
- Parameters:
xda (xarray.DataArray) – a multi-dimensional array to be subsampled
mode (str) – indicating how to subsample the time dimension
- Returns:
xda (xarray.DataArray) – subsampled