1 from typing import TypeVar, Iterable, Sequence, SupportsIndex, overload
3 _T = TypeVar("_T", int, float)
5 class memoryview(Iterable[_T]): # built in cython
6 def __len__(self) -> int: ...
7 def is_c_contig(self) -> bool: ...
8 def is_f_contig(self) -> bool: ...
9 def copy(self) -> memoryview[_T]: ...
10 def copy_fortran(self) -> memoryview[_T]: ...
12 def __getitem__(self, key: SupportsIndex, /) -> _T: ...
14 def __getitem__(self, key: slice, /) -> array[_T]: ...
16 def __setitem__(self, key: SupportsIndex, value: _T, /) -> None: ...
18 def __setitem__(self, key: slice, value: array[_T], /) -> None: ...
19 def __delitem__(self, key: SupportsIndex | slice, /) -> None: ...
21 def T(self) -> memoryview[_T]: ...
23 def base(self) -> array[_T]: ...
25 def itemsize(self) -> int: ...
27 def nbytes(self) -> int: ...
29 def ndim(self) -> int: ...
31 def shape(self) -> tuple[int]: ...
33 def size(self) -> int: ...
35 def strides(self) -> tuple[int]: ...
37 def suboffsets(self) -> tuple[int]: ...
39 class array(Sequence[_T]): # built in cython
40 def __len__(self) -> int: ...
41 def is_c_contig(self) -> bool: ...
42 def is_f_contig(self) -> bool: ...
43 def copy(self) -> memoryview[_T]: ...
44 def copy_fortran(self) -> memoryview[_T]: ...
46 def __getitem__(self, key: SupportsIndex, /) -> _T: ...
48 def __getitem__(self, key: slice, /) -> array[_T]: ...
50 def __setitem__(self, key: SupportsIndex, value: _T, /) -> None: ...
52 def __setitem__(self, key: slice, value: array[_T], /) -> None: ...
53 def __delitem__(self, key: SupportsIndex | slice, /) -> None: ...
55 def memview(self) -> memoryview[_T]: ...
57 def T(self) -> memoryview[_T]: ...
59 def base(self) -> array[_T]: ...
61 def itemsize(self) -> int: ...
63 def nbytes(self) -> int: ...
65 def ndim(self) -> int: ...
67 def shape(self) -> tuple[int]: ...
69 def size(self) -> int: ...
71 def strides(self) -> tuple[int]: ...
73 def suboffsets(self) -> tuple[int]: ...
75 def isqrt(x: int) -> int: ...
77 def new_u32(x: Iterable[int]) -> array[int]: ...
79 def new_u32(x: int) -> array[int]: ...
81 def new_u64(x: Iterable[int]) -> array[int]: ...
83 def new_u64(x: int) -> array[int]: ...
85 def new_f32(x: Iterable[float]) -> array[float]: ...
87 def new_f32(x: int) -> array[float]: ...
89 def new_f64(x: Iterable[float]) -> array[float]: ...
91 def new_f64(x: int) -> array[float]: ...
93 def new_num(x: Iterable[float]) -> array[float]: ...
95 def new_num(x: int) -> array[float]: ...
97 def sqrt_u32(x: Iterable[int]) -> array[int]: ...
99 def sqrt_u32(x: int) -> int: ...
101 def sqrt_u64(x: Iterable[int]) -> array[int]: ...
103 def sqrt_u64(x: int) -> int: ...
105 def rsqrt_f32(x: Iterable[float]) -> array[float]: ...
107 def rsqrt_f32(x: float) -> float: ...
109 def rsqrt_f64(x: Iterable[float]) -> array[float]: ...
111 def rsqrt_f64(x: float) -> float: ...
112 def hash_bkdr(str: bytes | str, val: int = 0) -> int: ...
113 def hash_sdbm(str: bytes | str, val: int = 0) -> int: ...
116 def __init__(self, poly: int, reversed=False) -> None: ...
117 def gen(self, poly: int, reversed=False) -> crc8: ...
118 def __call__(self, block: bytes, value=0) -> int: ...
119 def pack(self, block: bytes, value=0) -> bytes: ...
121 def table(self) -> array[int]: ...
124 def __init__(self, poly: int, reversed=False) -> None: ...
125 def gen(self, poly: int, reversed=False) -> crc16: ...
126 def __call__(self, block: bytes, value=0) -> int: ...
127 def pack(self, block: bytes, value=0) -> bytes: ...
129 def table(self) -> array[int]: ...
132 def __init__(self, poly: int, reversed=False) -> None: ...
133 def gen(self, poly: int, reversed=False) -> crc32: ...
134 def __call__(self, block: bytes, value=0) -> int: ...
135 def pack(self, block: bytes, value=0) -> bytes: ...
137 def table(self) -> array[int]: ...
140 def __init__(self, poly: int, reversed=False) -> None: ...
141 def gen(self, poly: int, reversed=False) -> crc64: ...
142 def __call__(self, block: bytes, value=0) -> int: ...
143 def pack(self, block: bytes, value=0) -> bytes: ...
145 def table(self) -> array[int]: ...
148 def __init__(self, fc: float, ts: float) -> None: ...
149 def gen(self, fc: float, ts: float) -> hpf: ...
150 def __call__(self, x: float) -> float: ...
151 def zero(self) -> hpf: ...
153 def alpha(self) -> float: ...
155 def alpha(self, x: float) -> None: ...
157 def output(self) -> float: ...
159 def input(self) -> float: ...
162 def __init__(self, fc: float, ts: float) -> None: ...
163 def gen(self, fc: float, ts: float) -> lpf: ...
164 def __call__(self, x: float) -> float: ...
165 def zero(self) -> lpf: ...
167 def alpha(self) -> float: ...
169 def alpha(self, x: float) -> None: ...
171 def output(self) -> float: ...
190 def mf(e: int | float, x: Iterable[float], a: Iterable[float]) -> array[float]: ...
193 def mf(e: int | float, x: float, a: Iterable[float]) -> float: ...
196 def gauss(x: Iterable[float], sigma: float, c: float) -> array[float]: ...
199 def gauss(x: float, sigma: float, c: float) -> float: ...
203 x: Iterable[float], sigma1: float, c1: float, sigma2: float, c2: float
204 ) -> array[float]: ...
207 def gauss2(x: float, sigma1: float, c1: float, sigma2: float, c2: float) -> float: ...
210 def gbell(x: Iterable[float], a: float, b: float, c: float) -> array[float]: ...
213 def gbell(x: float, a: float, b: float, c: float) -> float: ...
216 def sig(x: Iterable[float], a: float, c: float) -> array[float]: ...
219 def sig(x: float, a: float, c: float) -> float: ...
222 def dsig(x: Iterable[float], a1: float, c1: float, a2: float, c2: float) -> array[float]: ...
225 def dsig(x: float, a1: float, c1: float, a2: float, c2: float) -> float: ...
228 def psig(x: Iterable[float], a1: float, c1: float, a2: float, c2: float) -> array[float]: ...
231 def psig(x: float, a1: float, c1: float, a2: float, c2: float) -> float: ...
234 def trap(x: Iterable[float], a: float, b: float, c: float, d: float) -> array[float]: ...
237 def trap(x: float, a: float, b: float, c: float, d: float) -> float: ...
240 def tri(x: Iterable[float], a: float, b: float, c: float) -> array[float]: ...
243 def tri(x: float, a: float, b: float, c: float) -> float: ...
246 def lins(x: Iterable[float], a: float, b: float) -> array[float]: ...
249 def lins(x: float, a: float, b: float) -> float: ...
252 def linz(x: Iterable[float], a: float, b: float) -> array[float]: ...
255 def linz(x: float, a: float, b: float) -> float: ...
258 def s(x: Iterable[float], a: float, b: float) -> array[float]: ...
261 def s(x: float, a: float, b: float) -> float: ...
264 def z(x: Iterable[float], a: float, b: float) -> array[float]: ...
267 def z(x: float, a: float, b: float) -> float: ...
270 def pi(x: Iterable[float], a: float, b: float, c: float, d: float) -> array[float]: ...
273 def pi(x: float, a: float, b: float, c: float, d: float) -> float: ...
276 def __init__(self) -> None: ...
277 def set_kpid(self, kp: float, ki: float, kd: float) -> pid: ...
278 def run(self, set: float, fdb: float) -> float: ...
279 def pos(self, set: float, fdb: float) -> float: ...
280 def inc(self, set: float, fdb: float) -> float: ...
281 def zero(self) -> pid: ...
283 def kp(self) -> float: ...
285 def kp(self, kp: float) -> None: ...
287 def ki(self) -> float: ...
289 def ki(self, ki: float) -> None: ...
291 def kd(self) -> float: ...
293 def kd(self, kd: float) -> None: ...
295 def summax(self) -> float: ...
297 def summax(self, summax: float) -> None: ...
299 def summin(self) -> float: ...
301 def summin(self, summin: float) -> None: ...
303 def sum(self) -> float: ...
305 def outmax(self) -> float: ...
307 def outmax(self, outmax: float) -> None: ...
309 def outmin(self) -> float: ...
311 def outmin(self, outmin: float) -> None: ...
313 def out(self) -> float: ...
315 def fdb(self) -> float: ...
317 def err(self) -> float: ...
327 def __init__(self) -> None: ...
328 def set_opr(self, opr: int) -> pid_fuzzy: ...
329 def set_nfuzz(self, num: int) -> pid_fuzzy: ...
332 me: Iterable[Iterable[float]],
333 mec: Iterable[Iterable[float]],
334 mkp: Iterable[Iterable[float]],
335 mki: Iterable[Iterable[float]],
336 mkd: Iterable[Iterable[float]],
338 def set_kpid(self, kp: float, ki: float, kd: float) -> pid_fuzzy: ...
339 def run(self, set: float, fdb: float) -> float: ...
340 def pos(self, set: float, fdb: float) -> float: ...
341 def inc(self, set: float, fdb: float) -> float: ...
342 def zero(self) -> pid_fuzzy: ...
344 def me(self) -> array[float]: ...
346 def mec(self) -> array[float]: ...
348 def mkp(self) -> array[float]: ...
350 def mki(self) -> array[float]: ...
352 def mkd(self) -> array[float]: ...
354 def kp(self) -> float: ...
356 def kp(self, kp: float) -> None: ...
358 def ki(self) -> float: ...
360 def ki(self, ki: float) -> None: ...
362 def kd(self) -> float: ...
364 def kd(self, kd: float) -> None: ...
366 def summax(self) -> float: ...
368 def summax(self, summax: float) -> None: ...
370 def summin(self) -> float: ...
372 def summin(self, summin: float) -> None: ...
374 def sum(self) -> float: ...
376 def outmax(self) -> float: ...
378 def outmax(self, outmax: float) -> None: ...
380 def outmin(self) -> float: ...
382 def outmin(self, outmin: float) -> None: ...
384 def out(self) -> float: ...
386 def fdb(self) -> float: ...
388 def err(self) -> float: ...
390 def nrule(self) -> int: ...
392 def nfuzz(self) -> int: ...
394 def nfuzz(self, nfuzz: int) -> None: ...
397 def __init__(self) -> None: ...
398 def set_kpid(self, k: float, kp: float, ki: float, kd: float) -> pid_neuro: ...
399 def set_wpid(self, wp: float, wi: float, wd: float) -> pid_neuro: ...
400 def run(self, set: float, fdb: float) -> float: ...
401 def inc(self, set: float, fdb: float) -> float: ...
402 def zero(self) -> pid_neuro: ...
404 def k(self) -> float: ...
406 def k(self, k: float) -> None: ...
408 def kp(self) -> float: ...
410 def kp(self, kp: float) -> None: ...
412 def ki(self) -> float: ...
414 def ki(self, ki: float) -> None: ...
416 def kd(self) -> float: ...
418 def kd(self, kd: float) -> None: ...
420 def wp(self) -> float: ...
422 def wp(self, wp: float) -> None: ...
424 def wi(self) -> float: ...
426 def wi(self, wi: float) -> None: ...
428 def wd(self) -> float: ...
430 def wd(self, wd: float) -> None: ...
432 def outmax(self) -> float: ...
434 def outmax(self, outmax: float) -> None: ...
436 def outmin(self) -> float: ...
438 def outmin(self, outmin: float) -> None: ...
440 def out(self) -> float: ...
442 def fdb(self) -> float: ...
444 def err(self) -> float: ...
446 def ec(self) -> float: ...
449 def poly_eval(x: Iterable[float], a: Iterable[float]) -> array[float]: ...
451 def poly_eval(x: float, a: Iterable[float]) -> float: ...
453 def poly_evar(x: Iterable[float], a: Iterable[float]) -> array[float]: ...
455 def poly_evar(x: float, a: Iterable[float]) -> float: ...
457 class regress_linear:
459 def __init__(self, coef: float, bias: float = 0): ...
461 def __init__(self, coef: Iterable[float], bias: float = 0): ...
462 def eval(self, x: Iterable[float]) -> float | array[float]: ...
463 def err(self, x: Iterable[float], y: Iterable[float]) -> array[float]: ...
464 def gd(self, input: Iterable[float], error: float, alpha: float) -> regress_linear: ...
465 def sgd(self, x: Iterable[float], y: Iterable[float], alpha: float) -> regress_linear: ...
466 def bgd(self, x: Iterable[float], y: Iterable[float], alpha: float) -> regress_linear: ...
478 def zero(self) -> regress_linear: ...
480 def coef(self) -> array[float]: ...
483 def coef(self, coef: float) -> None: ...
486 def coef(self, coef: Iterable[float]) -> None: ...
488 def bias(self) -> float: ...
490 def bias(self, bias: float) -> None: ...
492 class regress_simple:
493 def __init__(self, coef: float = 1, bias: float = 0): ...
495 def eval(self, x: Iterable[float]) -> array[float]: ...
497 def eval(self, x: float) -> float: ...
499 def evar(self, y: Iterable[float]) -> array[float]: ...
501 def evar(self, y: float) -> float: ...
503 self, x: Iterable[float], y: Iterable[float], x_mean: float, y_mean: float
504 ) -> regress_simple: ...
505 def olsx(self, x: Iterable[float], y: Iterable[float], x_mean: float) -> regress_simple: ...
506 def olsy(self, x: Iterable[float], y: Iterable[float], y_mean: float) -> regress_simple: ...
507 def ols(self, x: Iterable[float], y: Iterable[float]) -> regress_simple: ...
508 def zero(self) -> regress_simple: ...
510 def coef(self) -> float: ...
512 def coef(self, coef: float) -> None: ...
514 def bias(self) -> float: ...
516 def bias(self, bias: float) -> None: ...
519 def __init__(self, num: Iterable[float], den: Iterable[float]) -> None: ...
520 def __call__(self, x: float) -> float: ...
522 def input(self) -> array[float]: ...
524 def num(self) -> array[float]: ...
526 def num(self, num: Iterable[float]) -> None: ...
528 def output(self) -> array[float]: ...
530 def den(self) -> array[float]: ...
532 def den(self, den: Iterable[float]) -> None: ...
533 def zero(self) -> tf: ...
547 def pos(self, x: Iterable[float]) -> array[float]: ...
549 def pos(self, x: float) -> float: ...
551 def vel(self, x: Iterable[float]) -> array[float]: ...
553 def vel(self, x: float) -> float: ...
555 def acc(self, x: Iterable[float]) -> array[float]: ...
557 def acc(self, x: float) -> float: ...
559 def jer(self, x: Iterable[float]) -> array[float]: ...
561 def jer(self, x: float) -> float: ...
563 def t(self) -> float: ...
565 def tv(self) -> float: ...
567 def ta(self) -> float: ...
569 def td(self) -> float: ...
571 def taj(self) -> float: ...
573 def tdj(self) -> float: ...
575 def p0(self) -> float: ...
577 def p1(self) -> float: ...
579 def v0(self) -> float: ...
581 def v1(self) -> float: ...
583 def vm(self) -> float: ...
585 def jm(self) -> float: ...
587 def am(self) -> float: ...
589 def dm(self) -> float: ...
609 def pos(self, x: Iterable[float]) -> array[float]: ...
611 def pos(self, x: float) -> float: ...
613 def vel(self, x: Iterable[float]) -> array[float]: ...
615 def vel(self, x: float) -> float: ...
617 def acc(self, x: Iterable[float]) -> array[float]: ...
619 def acc(self, x: float) -> float: ...
621 def p(self) -> array[float]: ...
623 def v(self) -> array[float]: ...
625 def a(self) -> array[float]: ...
649 def pos(self, x: Iterable[float]) -> array[float]: ...
651 def pos(self, x: float) -> float: ...
653 def vel(self, x: Iterable[float]) -> array[float]: ...
655 def vel(self, x: float) -> float: ...
657 def acc(self, x: Iterable[float]) -> array[float]: ...
659 def acc(self, x: float) -> float: ...
661 def p(self) -> array[float]: ...
663 def v(self) -> array[float]: ...
665 def a(self) -> array[float]: ...
693 def pos(self, x: Iterable[float]) -> array[float]: ...
695 def pos(self, x: float) -> float: ...
697 def vel(self, x: Iterable[float]) -> array[float]: ...
699 def vel(self, x: float) -> float: ...
701 def acc(self, x: Iterable[float]) -> array[float]: ...
703 def acc(self, x: float) -> float: ...
705 def jer(self, x: Iterable[float]) -> array[float]: ...
707 def jer(self, x: float) -> float: ...
709 def p(self) -> array[float]: ...
711 def v(self) -> array[float]: ...
713 def a(self) -> array[float]: ...
715 def j(self) -> array[float]: ...
729 def pos(self, x: Iterable[float]) -> array[float]: ...
731 def pos(self, x: float) -> float: ...
733 def vel(self, x: Iterable[float]) -> array[float]: ...
735 def vel(self, x: float) -> float: ...
737 def acc(self, x: Iterable[float]) -> array[float]: ...
739 def acc(self, x: float) -> float: ...
741 def t(self) -> float: ...
743 def p0(self) -> float: ...
745 def p1(self) -> float: ...
747 def v0(self) -> float: ...
749 def v1(self) -> float: ...
751 def vc(self) -> float: ...
753 def ta(self) -> float: ...
755 def td(self) -> float: ...
757 def pa(self) -> float: ...
759 def pd(self) -> float: ...
761 def ac(self) -> float: ...
763 def de(self) -> float: ...
767 def check(major: int = 0, minor: int = 0, patch: int = 0) -> int: ...
768 def __init__(self, major: int = 0, minor: int = 0, third: int = 0, extra: int = 0) -> None: ...
769 def __lt__(self, that: version) -> bool: ...
770 def __gt__(self, that: version) -> bool: ...
771 def __le__(self, that: version) -> bool: ...
772 def __ge__(self, that: version) -> bool: ...
773 def __eq__(self, that: version) -> bool: ...
774 def __ne__(self, that: version) -> bool: ...
775 def parse(self, ver: bytes | str) -> version: ...
776 def cmp(self, that: version) -> int: ...
778 def major(self) -> int: ...
780 def major(self, major: int) -> None: ...
782 def minor(self) -> int: ...
784 def minor(self, minor: int) -> None: ...
786 def third(self) -> int: ...
788 def third(self, third: int) -> None: ...
790 def extra(self) -> int: ...
792 def extra(self, extra: int) -> None: ...
794 def alpha(self) -> bytes: ...
796 def alpha(self, alpha: bytes | str) -> None: ...