Skip to content

Commit 36a5929

Browse files
author
Mauko Quiroga
committed
Add int and bool to generic array
1 parent 8f004a9 commit 36a5929

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

openfisca_core/commons/typing.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22

33
from nptyping import NDArray as Array
44

5-
6-
_T = TypeVar("_T", float, str)
7-
""":obj:`.TypeVar`: A wildcard type used by other types."""
8-
9-
ArrayLike = Union[Union[Array[float], Array[str]], Sequence[_T]]
5+
_Types = TypeVar("_Types", float, int, str, bool)
6+
_Array = Union[Array[float], Array[int], Array[str], Array[bool]]
7+
ArrayLike = Union[_Array, Sequence[_Types]]
108
""":obj:`.Generic`: Type of any castable to :class:`.ndarray`.
119
1210
These include any :obj:`.ndarray` and sequences (like

0 commit comments

Comments
 (0)