codekingpro/portable-devtools
114k
1import contextvars
2from _typeshed import SupportsWrite
3from collections.abc import Callable
4from typing import Any, Final, Literal, TypeAlias, TypedDict, Unpack, type_check_only
5from typing_extensions import CapsuleType
6
7from numpy import (
8 absolute,
9 add,
10 arccos,
11 arccosh,
12 arcsin,
13 arcsinh,
14 arctan,
15 arctan2,
16 arctanh,
17 bitwise_and,
18 bitwise_count,
19 bitwise_or,
20 bitwise_xor,
21 cbrt,
22 ceil,
23 conj,
24 conjugate,
25 copysign,
26 cos,
27 cosh,
28 deg2rad,
29 degrees,
30 divide,
31 divmod,
32 e,
33 equal,
34 euler_gamma,
35 exp,
36 exp2,
37 expm1,
38 fabs,
39 float_power,
40 floor,
41 floor_divide,
42 fmax,
43 fmin,
44 fmod,
45 frexp,
46 frompyfunc,
47 gcd,
48 greater,
49 greater_equal,
50 heaviside,
51 hypot,
52 invert,
53 isfinite,
54 isinf,
55 isnan,
56 isnat,
57 lcm,
58 ldexp,
59 left_shift,
60 less,
61 less_equal,
62 log,
63 log1p,
64 log2,
65 log10,
66 logaddexp,
67 logaddexp2,
68 logical_and,
69 logical_not,
70 logical_or,
71 logical_xor,
72 matmul,
73 matvec,
74 maximum,
75 minimum,
76 mod,
77 modf,
78 multiply,
79 negative,
80 nextafter,
81 not_equal,
82 pi,
83 positive,
84 power,
85 rad2deg,
86 radians,
87 reciprocal,
88 remainder,
89 right_shift,
90 rint,
91 sign,
92 signbit,
93 sin,
94 sinh,
95 spacing,
96 sqrt,
97 square,
98 subtract,
99 tan,
100 tanh,
101 true_divide,
102 trunc,
103 vecdot,
104 vecmat,
105)
106
107__all__ = [
108 "absolute",
109 "add",
110 "arccos",
111 "arccosh",
112 "arcsin",
113 "arcsinh",
114 "arctan",
115 "arctan2",
116 "arctanh",
117 "bitwise_and",
118 "bitwise_count",
119 "bitwise_or",
120 "bitwise_xor",
121 "cbrt",
122 "ceil",
123 "conj",
124 "conjugate",
125 "copysign",
126 "cos",
127 "cosh",
128 "deg2rad",
129 "degrees",
130 "divide",
131 "divmod",
132 "e",
133 "equal",
134 "euler_gamma",
135 "exp",
136 "exp2",
137 "expm1",
138 "fabs",
139 "float_power",
140 "floor",
141 "floor_divide",
142 "fmax",
143 "fmin",
144 "fmod",
145 "frexp",
146 "frompyfunc",
147 "gcd",
148 "greater",
149 "greater_equal",
150 "heaviside",
151 "hypot",
152 "invert",
153 "isfinite",
154 "isinf",
155 "isnan",
156 "isnat",
157 "lcm",
158 "ldexp",
159 "left_shift",
160 "less",
161 "less_equal",
162 "log",
163 "log1p",
164 "log2",
165 "log10",
166 "logaddexp",
167 "logaddexp2",
168 "logical_and",
169 "logical_not",
170 "logical_or",
171 "logical_xor",
172 "matmul",
173 "matvec",
174 "maximum",
175 "minimum",
176 "mod",
177 "modf",
178 "multiply",
179 "negative",
180 "nextafter",
181 "not_equal",
182 "pi",
183 "positive",
184 "power",
185 "rad2deg",
186 "radians",
187 "reciprocal",
188 "remainder",
189 "right_shift",
190 "rint",
191 "sign",
192 "signbit",
193 "sin",
194 "sinh",
195 "spacing",
196 "sqrt",
197 "square",
198 "subtract",
199 "tan",
200 "tanh",
201 "true_divide",
202 "trunc",
203 "vecdot",
204 "vecmat",
205]
206
207###
208
209_ErrKind: TypeAlias = Literal["ignore", "warn", "raise", "call", "print", "log"]
210_ErrCall: TypeAlias = Callable[[str, int], Any] | SupportsWrite[str]
211
212@type_check_only
213class _ExtOjbDict(TypedDict, total=False):
214 divide: _ErrKind
215 over: _ErrKind
216 under: _ErrKind
217 invalid: _ErrKind
218 call: _ErrCall | None
219 bufsize: int
220
221# re-exports from `_core._multiarray_umath` that are used by `_core._ufunc_config`
222
223NAN: Final[float] = float("nan")
224PINF: Final[float] = float("+inf")
225NINF: Final[float] = float("-inf")
226PZERO: Final[float] = +0.0
227NZERO: Final[float] = -0.0
228_UFUNC_API: Final[CapsuleType] = ...
229_extobj_contextvar: Final[contextvars.ContextVar[CapsuleType]] = ...
230
231def _get_extobj_dict() -> _ExtOjbDict: ...
232def _make_extobj(*, all: _ErrKind = ..., **kwargs: Unpack[_ExtOjbDict]) -> CapsuleType: ...
233 