-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Complete
scipy.special
stiubs (excluding cython_special
)
- Loading branch information
Showing
13 changed files
with
105 additions
and
603 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
# Helper types for internal use (type-check only). | ||
|
||
from typing import TypeAlias | ||
|
||
import numpy as np | ||
import numpy.typing as npt | ||
from typing_extensions import TypeVar | ||
|
||
__all__ = ("ArrayLike0D", "Untyped") | ||
__all__ = "AnyBool", "AnyChar", "AnyComplex", "AnyInt", "AnyReal", "AnyScalar", "Array0D", "Untyped" | ||
|
||
# placeholder for missing annotations | ||
Untyped: TypeAlias = object | ||
|
||
# keep in sync with `numpy.typing._scalar_like._ScalarLike` | ||
ArrayLike0D: TypeAlias = bool | int | float | complex | str | bytes | np.generic | ||
_SCT = TypeVar("_SCT", bound=np.generic, default=np.generic) | ||
Array0D: TypeAlias = np.ndarray[tuple[()], np.dtype[_SCT]] | ||
|
||
# keep in sync with `numpy._typing._scalars` | ||
AnyBool: TypeAlias = bool | np.bool_ | ||
AnyInt: TypeAlias = int | np.integer[npt.NBitBase] | np.bool_ | ||
AnyReal: TypeAlias = int | float | np.floating[npt.NBitBase] | np.integer[npt.NBitBase] | np.bool_ | ||
AnyComplex: TypeAlias = int | float | complex | np.number[npt.NBitBase] | np.bool_ | ||
AnyChar: TypeAlias = str | bytes | ||
AnyScalar: TypeAlias = int | float | complex | AnyChar | np.generic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.