Typing aliases (cmomy.core.typing)#

Classes:

DataT

DataArray or Dataset

FloatT

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

SamplerArrayT

TypeVar of types wrapped by IndexSampler

Data:

IndexAny

Index

class cmomy.core.typing.DataT#

DataArray or Dataset

alias of TypeVar(‘DataT’, ~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’, ~numpy.float64, ~numpy.float32)

class cmomy.core.typing.SamplerArrayT#

TypeVar of types wrapped by IndexSampler

alias of TypeVar(‘SamplerArrayT’, NDArrayAny, ~xarray.core.dataarray.DataArray, ~xarray.core.dataset.Dataset, xr.DataArray | xr.Dataset)

cmomy.core.typing.Axes = int | tuple[int, ...]#

Axes type

cmomy.core.typing.AxesWrap = complex | tuple[complex, ...]#

Axes type (with wrapping)

cmomy.core.typing.AxisReduce = int | None#

Reduction axes type

cmomy.core.typing.AxisReduceWrap = complex | None#

Reduction axes type (with wrapping)

cmomy.core.typing.AxisReduceMult = int | tuple[int, ...] | None#

Reduction axes type (multiple)

cmomy.core.typing.AxisReduceMultWrap = complex | tuple[complex, ...] | None#

Reduction axes type (multiple, with wrapping)

cmomy.core.typing.RngTypes = int | collections.abc.Sequence[int] | numpy.random.bit_generator.SeedSequence | numpy.random.bit_generator.BitGenerator | numpy.random._generator.Generator#

Random number generator types

cmomy.core.typing.DTypeAny[source]#

Any dtype

cmomy.core.typing.FloatDTypes = numpy.float32 | numpy.float64#

Floating dtype

cmomy.core.typing.LongIntDType[source]#

Long integer dtype

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

Array type (any dtype)

alias of ndarray[tuple[Any, …], dtype[Any]]

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

Array type (int dtype)

alias of ndarray[tuple[Any, …], dtype[int64]]

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

Array type (float dtype)

alias of ndarray[tuple[Any, …], dtype[float32 | float64]]

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

Array type (bool dtype)

alias of ndarray[tuple[Any, …], dtype[bool]]

cmomy.core.typing.IntDTypeT[source]#

Integer dtype

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

Float or array of float

alias of FloatT | ndarray[tuple[Any, …], dtype[FloatT]]

cmomy.core.typing.Moments = int | tuple[int] | tuple[int, int]#

Moments type

cmomy.core.typing.MomentsStrict = tuple[int] | tuple[int, int]#

Strict moments type

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

Number of moment dimensions

alias of Literal[1, 2]

cmomy.core.typing.MomAxes = int | tuple[int] | tuple[int, int]#

Axes containing moment(s).

cmomy.core.typing.MomAxesStrict = tuple[int] | tuple[int, int]#

Axes containing moment(s).

cmomy.core.typing.DimsReduce = collections.abc.Hashable | None#

Reduction dimension

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

Reduction dimension(s)

alias of Hashable | Collection[Hashable] | None

cmomy.core.typing.Dims = str | collections.abc.Collection[collections.abc.Hashable] | ellipsis | None#

Dimensions

cmomy.core.typing.MomDims = collections.abc.Hashable | tuple[collections.abc.Hashable] | tuple[collections.abc.Hashable, collections.abc.Hashable]#

Dimensions containing moment(s)

cmomy.core.typing.MomDimsStrict = tuple[collections.abc.Hashable] | tuple[collections.abc.Hashable, collections.abc.Hashable]#

Dimensions containing moment(s)

cmomy.core.typing.IndexAny = 'pd.Index[Any]'#

Index

cmomy.core.typing.CoordsType = collections.abc.Mapping[typing.Any, typing.Any] | None#

Coordinates

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

Order parameters

alias of Literal[‘C’, ‘F’] | None

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

Order parameters

alias of Literal[‘A’, ‘C’, ‘F’] | None

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

Order parameters

alias of Literal[‘K’, ‘A’, ‘C’, ‘F’] | None

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

Casting rules

alias of Literal[‘no’, ‘equiv’, ‘safe’, ‘same_kind’, ‘unsafe’]

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’]

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

Style to convert to

alias of Literal[‘central’, ‘raw’]