types

A module containing type hints for the PQAnalysis package.

Summary

Reference

class Np1DIntArray

A type hint for a 1D np.ndarray with dtype np.integer

alias of Annotated[ndarray, Is[lambda array: array.ndim == 1 and np.issubdtype(array.dtype, np.integer) or len(array) == 0]]

class Np1DNumberArray

A type variable for a 1D np.ndarray with dtype np.number

alias of Annotated[ndarray, Is[lambda array: array.ndim == 1 and np.issubdtype(array.dtype, np.number) or len(array) == 0]]

class Np2DIntArray

A type hint for a 2D np.ndarray with dtype np.integer

alias of Annotated[ndarray, Is[lambda array: array.ndim == 2 and np.issubdtype(array.dtype, np.integer)]]

class Np2DNumberArray

A type hint for a 2D np.ndarray with dtype np.number

alias of Annotated[ndarray, Is[lambda array: array.ndim == 2 and np.issubdtype(array.dtype, np.number)]]

Np3x3NumberArray

A type hint for a 3x3 np.ndarray matrix with dtype np.number

alias of Annotated[ndarray, Is[lambda array: array.ndim == 2 and array.shape == (3, 3) and np.issubdtype(array.dtype, np.number)]]

class NpnDNumberArray

A type hint for a nD np.ndarray with dtype np.number

alias of Annotated[ndarray, Is[lambda array: array.ndim > 0 and np.issubdtype(array.dtype, np.number)]]

class PositiveInt

A type hint for positive integers

alias of Annotated[int | int64, Is[lambda int: int > 0]]

class Range

A type hint for a range object

alias of Annotated[range, Is[lambda r: isinstance(r, range)]]