Skip to content

Commit

Permalink
Add int and bool to generic array
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauko Quiroga committed Aug 31, 2021
1 parent 8f004a9 commit 36a5929
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions openfisca_core/commons/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 36a5929

Please sign in to comment.