Typing aliases (cmomy.resample.typing)#
Classes:
Extra parameters to |
Data:
Input type for sampler |
- class cmomy.resample.typing.FactoryIndexSamplerKwargs[source]#
Bases:
TypedDictExtra parameters to
resample.factory_sampler()- Parameters:
indices (array of
int) – Array of shape(nrep, size). If passed, create freq from indices.freq (array-like,
DataArray, orDatasetofint) – Array of shape(nrep, size)where nrep is the number of replicates andsize = self.shape[axis]. freq is the weight that each sample contributes to a replicate. Iffreqis anxarrayobject, it should have dimensionsrep_dimanddim.ndat (
int) – Size of data along resampled axis.nrep (
int) – Number of resample replicates.nsamp (
int) – Number of samples in a single resampled replicate. Defaults to size of data along sampled axis.paired (
bool) – IfFalseand generatingfreqfromnrepwithdataof typeDataset, Generate uniquefreqfor each variable indata. IfTrue, treat all variables indataas paired, and use samefreqfor each.rng – Random number generator object. Defaults to output of
default_rng(). If pass in a seed value, create a newGeneratorobject with this seedresample_replace (
bool) – If True, do resampling with replacement.shuffle (
bool) – IfTrue, shuffleindicescreated fromfreqfor each row.
- cmomy.resample.typing.SamplerType = 'int | NDArrayAny | xr.DataArray | xr.Dataset | IndexSampler[Any] | FactoryIndexSamplerKwargs'#
Input type for sampler