diff options
author | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2022-03-18 17:09:56 +0100 |
---|---|---|
committer | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2022-03-18 18:29:54 +0100 |
commit | 7739583f5fb39c31e83010a3153fa078004e55eb (patch) | |
tree | 23435d5de3f1870bc664354d50524b7166c2587a /numpy/typing/_scalars.py | |
parent | a8f9711493adee93fa3d61e7ef1bee11d7055a85 (diff) | |
download | numpy-7739583f5fb39c31e83010a3153fa078004e55eb.tar.gz |
MAINT: Split `numpy.typing` into a public and private component
i.e. `numpy.typing` and `numpy._typing`
Diffstat (limited to 'numpy/typing/_scalars.py')
-rw-r--r-- | numpy/typing/_scalars.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/numpy/typing/_scalars.py b/numpy/typing/_scalars.py deleted file mode 100644 index 516b996dc..000000000 --- a/numpy/typing/_scalars.py +++ /dev/null @@ -1,30 +0,0 @@ -from typing import Union, Tuple, Any - -import numpy as np - -# NOTE: `_StrLike_co` and `_BytesLike_co` are pointless, as `np.str_` and -# `np.bytes_` are already subclasses of their builtin counterpart - -_CharLike_co = Union[str, bytes] - -# The 6 `<X>Like_co` type-aliases below represent all scalars that can be -# coerced into `<X>` (with the casting rule `same_kind`) -_BoolLike_co = Union[bool, np.bool_] -_UIntLike_co = Union[_BoolLike_co, np.unsignedinteger] -_IntLike_co = Union[_BoolLike_co, int, np.integer] -_FloatLike_co = Union[_IntLike_co, float, np.floating] -_ComplexLike_co = Union[_FloatLike_co, complex, np.complexfloating] -_TD64Like_co = Union[_IntLike_co, np.timedelta64] - -_NumberLike_co = Union[int, float, complex, np.number, np.bool_] -_ScalarLike_co = Union[ - int, - float, - complex, - str, - bytes, - np.generic, -] - -# `_VoidLike_co` is technically not a scalar, but it's close enough -_VoidLike_co = Union[Tuple[Any, ...], np.void] |