Typing aliases (cmomy.core.typing)#

Classes:

GenArrayT

General data set/array

DataT

DataArray or Dataset

ArrayT

TypeVar of array types with restriction

SamplerArrayT

TypeVar of types wrapped by IndexSampler

FloatT

TypeVar of floating point precision (np.float32, np.float64, default=Any)

ScalarT

TypeVar of for np.generic dtype.

FloatingT

TypeVar of floating point precision (all)

ReduceDataKwargs

Extra parameters to reduction.reduce_data()

ReduceValsKwargs

Extra parameters to reduction.reduce_vals()

ReduceDataGroupedKwargs

Extra parameters to grouped.reduce_data_grouped()

ReduceDataIndexedKwargs

Extra parameters to grouped.reduce_data_indexed()

ResampleDataKwargs

Extra parameters to resample.resample_data()

ResampleValsKwargs

Extra parameters for resample.resample_vals()

JackknifeDataKwargs

Extra parameters for resample.jackknife_data()

JackknifeValsKwargs

Extra parameters for resample.jackknife_data()

WrapRawKwargs

Extra parameters for wrap_raw()

MomentsTypeKwargs

Extra parameters for convert.moments_type()

CumulativeKwargs

Extra parameters for convert.cumulative()

MomentsToComomentsKwargs

Extra parameters for convert.moments_to_comoments()

SelectMomentKwargs

Extra parameters to utils.select_moment()

ValsToDataKwargs

Extra parameters to utils.vals_to_data()

RollingDataKwargs

Extra parameters to rolling.rolling_data()

RollingValsKwargs

Extra parameters to rolling.rolling_vals()

RollingExpDataKwargs

Extra parameters to rolling.rolling_exp_data()

RollingExpValsKwargs

Extra parameters to rolling.rolling_exp_vals()

WrapKwargs

Extra parameters to cmomy.wrap()

ZerosLikeKwargs

Extra parameters to cmomy.zeros_like()

WrapNPTransform

Extra parameters to CentralMomentsArray.cumulative()

WrapNPResampleAndReduceKwargs

Extra parameters to CentralMomentsArray.resample_and_reduce()

WrapNPReduceKwargs

Extra parameters to CentralMomentsArray.reduce()

IndexSamplerFromDataKwargs

Extra parameters to resample.IndexSampler.from_data()

FactoryIndexSamplerKwargs

Extra parameters to resample.factory_sampler()

class cmomy.core.typing.GenArrayT#

General data set/array

alias of TypeVar(‘GenArrayT’, ~numpy.ndarray[~typing.Any, ~numpy.dtype[~typing.Any]], ~xarray.core.dataarray.DataArray, ~xarray.core.dataset.Dataset)

class cmomy.core.typing.DataT#

DataArray or Dataset

alias of TypeVar(‘DataT’, ~xarray.core.dataarray.DataArray, ~xarray.core.dataset.Dataset)

class cmomy.core.typing.ArrayT#

TypeVar of array types with restriction

alias of TypeVar(‘ArrayT’, ~numpy.ndarray[~typing.Any, ~numpy.dtype[~numpy.float64]], ~numpy.ndarray[~typing.Any, ~numpy.dtype[~numpy.float32]], ~xarray.core.dataarray.DataArray)

class cmomy.core.typing.SamplerArrayT#

TypeVar of types wrapped by IndexSampler

alias of TypeVar(‘SamplerArrayT’, ~numpy.ndarray[~typing.Any, ~numpy.dtype[~typing.Any]], ~xarray.core.dataarray.DataArray, ~xarray.core.dataset.Dataset, ~xarray.core.dataarray.DataArray | ~xarray.core.dataset.Dataset)

class cmomy.core.typing.FloatT#

TypeVar of floating point precision (np.float32, np.float64, default=Any)

alias of TypeVar(‘FloatT’, ~typing.Any, ~numpy.float32, ~numpy.float64)

class cmomy.core.typing.ScalarT#

TypeVar of for np.generic dtype.

alias of TypeVar(‘ScalarT’, bound=generic)

class cmomy.core.typing.FloatingT#

TypeVar of floating point precision (all)

alias of TypeVar(‘FloatingT’, bound=np.floating[Any])

cmomy.core.typing.Moments(*args, **kwargs)#

Moments type

alias of int | tuple[int] | tuple[int, int]

cmomy.core.typing.MissingCoreDimOptions(*args, **kwargs)#

What to do if missing a core dimensions.

alias of Literal[‘raise’, ‘copy’, ‘drop’]

cmomy.core.typing.SelectMoment(*args, **kwargs)#

Moment names.

alias of Literal[‘weight’, ‘ave’, ‘cov’, ‘var’, ‘xave’, ‘yave’, ‘xvar’, ‘yvar’, ‘all’, ‘xmom_0’, ‘xmom_1’, ‘ymom_0’, ‘ymom_1’]

class cmomy.core.typing.ReduceDataKwargs[source]#

Bases: _MomNDimKwargs, _AxisMultKwargs, _ReductionKwargs, _ParallelKwargs, _OrderKwargs, _KeepDimsKwargs, _MomAxesKwargs, _MomParamsKwargs, _MoveAxisToEndKwargs

Extra parameters to reduction.reduce_data()

class cmomy.core.typing.ReduceValsKwargs[source]#

Bases: _ValsKwargs, _OrderCFKwargs, _MomParamsKwargs

Extra parameters to reduction.reduce_vals()

class cmomy.core.typing.ReduceDataGroupedKwargs[source]#

Bases: _DataKwargs, _MoveAxisToEndKwargs, _OrderCFKwargs, _MomParamsKwargs

Extra parameters to grouped.reduce_data_grouped()

class cmomy.core.typing.ReduceDataIndexedKwargs[source]#

Bases: _DataKwargs, _MoveAxisToEndKwargs, _OrderKwargs, _MomParamsKwargs

Extra parameters to grouped.reduce_data_indexed()

class cmomy.core.typing.ResampleDataKwargs[source]#

Bases: _DataKwargs, _RepDimKwargs, _MoveAxisToEndKwargs, _OrderKwargs, _MomParamsKwargs

Extra parameters to resample.resample_data()

class cmomy.core.typing.ResampleValsKwargs[source]#

Bases: _ValsKwargs, _RepDimKwargs, _MoveAxisToEndKwargs, _OrderCFKwargs, _MomParamsKwargs

Extra parameters for resample.resample_vals()

class cmomy.core.typing.JackknifeDataKwargs[source]#

Bases: _DataKwargs, _MoveAxisToEndKwargs, _OrderKwargs, _MomParamsKwargs

Extra parameters for resample.jackknife_data()

class cmomy.core.typing.JackknifeValsKwargs[source]#

Bases: _ValsKwargs, _MoveAxisToEndKwargs, _OrderCFKwargs, _MomParamsKwargs

Extra parameters for resample.jackknife_data()

class cmomy.core.typing.WrapRawKwargs[source]#

Bases: _MomNDimKwargs, _ReductionKwargs, _OrderKwargs, _MomAxesKwargs, _MomParamsKwargs

Extra parameters for wrap_raw()

class cmomy.core.typing.MomentsTypeKwargs[source]#

Bases: WrapRawKwargs, _MoveAxisToEndKwargs

Extra parameters for convert.moments_type()

class cmomy.core.typing.CumulativeKwargs[source]#

Bases: _DataKwargs, _MoveAxisToEndKwargs, _OrderKwargs, _MomParamsKwargs

Extra parameters for convert.cumulative()

class cmomy.core.typing.MomentsToComomentsKwargs[source]#

Bases: _MomDimsAndApplyUFuncKwargs, _OrderCFKwargs, _MomAxesKwargs, _MomParamsKwargs

Extra parameters for convert.moments_to_comoments()

class cmomy.core.typing.SelectMomentKwargs[source]#

Bases: _MomNDimKwargs, _MomDimsAndApplyUFuncKwargs, _MomAxesKwargs, _MomParamsKwargs

Extra parameters to utils.select_moment()

class cmomy.core.typing.ValsToDataKwargs[source]#

Bases: _MomKwargs, _MomDimsAndApplyUFuncKwargs, _MomParamsKwargs

Extra parameters to utils.vals_to_data()

class cmomy.core.typing.RollingDataKwargs[source]#

Bases: _DataKwargs, _RollingKwargs, _MoveAxisToEndKwargs, _OrderKwargs, _MomParamsKwargs

Extra parameters to rolling.rolling_data()

class cmomy.core.typing.RollingValsKwargs[source]#

Bases: _ValsKwargs, _RollingKwargs, _MoveAxisToEndKwargs, _OrderCFKwargs, _MomParamsKwargs

Extra parameters to rolling.rolling_vals()

class cmomy.core.typing.RollingExpDataKwargs[source]#

Bases: _DataKwargs, _RollingExpKwargs, _MoveAxisToEndKwargs, _OrderKwargs, _MomParamsKwargs

Extra parameters to rolling.rolling_exp_data()

class cmomy.core.typing.RollingExpValsKwargs[source]#

Bases: _ValsKwargs, _RollingExpKwargs, _MoveAxisToEndKwargs, _OrderCFKwargs, _MomParamsKwargs

Extra parameters to rolling.rolling_exp_vals()

class cmomy.core.typing.WrapKwargs[source]#

Bases: _MomNDimKwargs, _MomAxesKwargs, _MomParamsKwargs

Extra parameters to cmomy.wrap()

class cmomy.core.typing.ZerosLikeKwargs[source]#

Bases: _OrderKwargs

Extra parameters to cmomy.zeros_like()

class cmomy.core.typing.WrapNPTransform[source]#

Bases: _MoveAxisToEndKwargs, _OrderKwargs, _ParallelKwargs

Extra parameters to CentralMomentsArray.cumulative()

class cmomy.core.typing.WrapNPResampleAndReduceKwargs[source]#

Bases: WrapNPTransform

Extra parameters to CentralMomentsArray.resample_and_reduce()

class cmomy.core.typing.WrapNPReduceKwargs[source]#

Bases: WrapNPTransform, _KeepDimsKwargs

Extra parameters to CentralMomentsArray.reduce()

class cmomy.core.typing.IndexSamplerFromDataKwargs[source]#

Bases: _AxisKwargs, _MomAxesKwargs, _MomParamsKwargs

Extra parameters to resample.IndexSampler.from_data()

class cmomy.core.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, or Dataset of int) – Array of shape (nrep, size) where nrep is the number of replicates and size = self.shape[axis]. freq is the weight that each sample contributes to a replicate. If freq is an xarray object, it should have dimensions rep_dim and dim.

  • 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) – If False and generating freq from nrep with data of type Dataset, Generate unique freq for each variable in data. If True, treat all variables in data as paired, and use same freq for each.

  • rng – Random number generator object. Defaults to output of default_rng(). If pass in a seed value, create a new Generator object with this seed

  • resample_replace (bool) – If True, do resampling with replacement.

  • shuffle (bool) – If True, shuffle indices created from freq for each row.

cmomy.core.typing.Sampler(*args, **kwargs)#

IndexSampler or mapping which can be converted to IndexSampler

alias of int | ndarray[Any, dtype[Any]] | DataArray | Dataset | IndexSampler[Any] | FactoryIndexSamplerKwargs