diff --git a/openfisca_core/commons/typing.py b/openfisca_core/commons/typing.py index 9142a06c51..1cfbdc1206 100644 --- a/openfisca_core/commons/typing.py +++ b/openfisca_core/commons/typing.py @@ -2,11 +2,9 @@ from nptyping import NDArray as Array - -_T = TypeVar("_T", float, str) -""":obj:`.TypeVar`: A wildcard type used by other types.""" - -ArrayLike = Union[Union[Array[float], Array[str]], Sequence[_T]] +_Types = TypeVar("_Types", float, int, str, bool) +_Array = Union[Array[float], Array[int], Array[str], Array[bool]] +ArrayLike = Union[_Array, Sequence[_Types]] """:obj:`.Generic`: Type of any castable to :class:`.ndarray`. These include any :obj:`.ndarray` and sequences (like