fgen.wrapping_strategies.type_annotations#

Helpers for type annotations

PINT_QUANTITY_TYPE_ANNOTATION#

PINT_QUANTITY_TYPE_ANNOTATION: str = 'pint.registry.UnitRegistry.Quantity'#

Type annotation for pint quantities.

Currently these don’t support information about the type held by the quantity. This can be updated in future.

NUMPY_ARRAY_TYPE_ANNOTATION_BASE#

NUMPY_ARRAY_TYPE_ANNOTATION_BASE: str = 'npt.NDArray[{kind}]'#

Base type annotation for numpy arrays

get_numpy_array_type_annotation#

get_numpy_array_type_annotation(value)[source]#

Get type annotation for a numpy array

Return type:

str