11from collections .abc import Callable
2- from typing import Any , Literal , TypeAlias , TypeVar , overload
2+ from typing import Any , Final , Literal , TypeAlias , TypeVar , overload
33from typing_extensions import deprecated
44
55import numpy as np
@@ -28,6 +28,9 @@ __all__ = [
2828]
2929
3030_InexactT = TypeVar ("_InexactT" , bound = npc .inexact )
31+ _ComplexT = TypeVar ("_ComplexT" , bound = npc .complexfloating )
32+ _ShapeT = TypeVar ("_ShapeT" , bound = tuple [int , ...])
33+
3134_FuncND : TypeAlias = Callable [[onp .Array [Any , _InexactT ]], onp .ToComplexND ] # return type is unsafely cast to the input type
3235
3336_ToPosInt : TypeAlias = npc .unsignedinteger | Literal [0 , 1 , 2 , 4 , 5 , 6 , 7 , 8 ]
@@ -41,6 +44,23 @@ _InexactND: TypeAlias = onp.ArrayND[npc.inexact]
4144
4245###
4346
47+ eps : Final [np .float64 ] = ... # undocumented
48+ feps : Final [np .float32 ] = ... # undocumented
49+ _array_precision : Final [dict [Literal ["i" , "l" , "f" , "d" , "F" , "D" ], Literal [0 , 1 ]]] = ... # undocumented
50+
51+ def _asarray_square (A : onp .ToArray2D [_InexactT ]) -> onp .Array2D [_InexactT ]: ... # undocumented
52+
53+ #
54+ @overload
55+ def _maybe_real (
56+ A : onp .ArrayND [npc .inexact ], B : onp .ArrayND [npc .inexact64 , _ShapeT ], tol : float | None = None
57+ ) -> onp .ArrayND [np .float64 , _ShapeT ]: ... # undocumented
58+ @overload
59+ def _maybe_real (
60+ A : onp .ArrayND [npc .inexact ], B : onp .ArrayND [npc .inexact32 , _ShapeT ], tol : float | None = None
61+ ) -> onp .ArrayND [np .float32 , _ShapeT ]: ... # undocumented
62+
63+ #
4464@overload # +integer, +unsignedinteger
4565def fractional_matrix_power (A : onp .ToIntND , t : _ToPosInt ) -> _IntND : ...
4666@overload # ~float64, +integer
@@ -118,6 +138,9 @@ def expm(A: onp.ToJustComplexND) -> _ComplexND: ...
118138@overload # +complexfloating
119139def expm (A : onp .ToComplexND ) -> _InexactND : ...
120140
141+ #
142+ def _exp_sinch (x : onp .ArrayND [_ComplexT , _ShapeT ]) -> onp .ArrayND [_ComplexT , _ShapeT ]: ... # undocumented
143+
121144#
122145@overload # +integer | ~float64
123146def cosm (A : onp .ToIntND | onp .ToJustFloat64_ND ) -> _Float64ND : ...
0 commit comments