Typing aliases (cmomy.resample.typing
)#
Classes:
Extra parameters to |
Data:
Input type for sampler |
- class cmomy.resample.typing.FactoryIndexSamplerKwargs[source]#
Bases:
TypedDict
Extra 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
, orDataset
ofint
) – 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. Iffreq
is anxarray
object, it should have dimensionsrep_dim
anddim
.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
) – IfFalse
and generatingfreq
fromnrep
withdata
of typeDataset
, Generate uniquefreq
for each variable indata
. IfTrue
, treat all variables indata
as paired, and use samefreq
for each.rng – Random number generator object. Defaults to output of
default_rng()
. If pass in a seed value, create a newGenerator
object with this seedresample_replace (
bool
) – If True, do resampling with replacement.shuffle (
bool
) – IfTrue
, shuffleindices
created fromfreq
for each row.
- cmomy.resample.typing.SamplerType = 'int | NDArrayAny | xr.DataArray | xr.Dataset | IndexSampler[Any] | FactoryIndexSamplerKwargs'#
Input type for sampler