Skip to content

pandas_openscm.typing#

Type hints that are used throughout

Attributes:

Name Type Description
NP_ARRAY_OF_BOOL TypeAlias

Type alias for an array of boolean values

NP_ARRAY_OF_FLOAT_OR_INT TypeAlias

Type alias for an array of numpy float or int (not complex)

NP_FLOAT_OR_INT TypeAlias

Type alias for a numpy float or int (not complex)

PINT_NUMPY_ARRAY TypeAlias

Type alias for a pint quantity that wraps a numpy array

PINT_SCALAR TypeAlias

Type alias for a pint quantity that wraps a numpy scalar

NP_ARRAY_OF_BOOL module-attribute #

NP_ARRAY_OF_BOOL: TypeAlias = NDArray[bool]

Type alias for an array of boolean values

NP_ARRAY_OF_FLOAT_OR_INT module-attribute #

NP_ARRAY_OF_FLOAT_OR_INT: TypeAlias = NDArray[
    NP_FLOAT_OR_INT
]

Type alias for an array of numpy float or int (not complex)

NP_FLOAT_OR_INT module-attribute #

NP_FLOAT_OR_INT: TypeAlias = Union[
    floating[Any], integer[Any]
]

Type alias for a numpy float or int (not complex)

PINT_NUMPY_ARRAY module-attribute #

PINT_NUMPY_ARRAY: TypeAlias = NumpyQuantity[
    NP_ARRAY_OF_FLOAT_OR_INT
]

Type alias for a pint quantity that wraps a numpy array

No shape hints because that doesn't seem to be supported by numpy yet.

PINT_SCALAR module-attribute #

PINT_SCALAR: TypeAlias = NumpyQuantity[NP_FLOAT_OR_INT]

Type alias for a pint quantity that wraps a numpy scalar