|
15 | 15 | inf = float("inf") |
16 | 16 |
|
17 | 17 |
|
| 18 | +@runtime_checkable |
| 19 | +class NestedSequence[T_t_co](Protocol): |
| 20 | + def __getitem__(self, key: int, /) -> "Union[T_t_co, NestedSequence[T_t_co]]": ... |
| 21 | + |
| 22 | + def __len__(self, /) -> int: ... |
| 23 | + |
| 24 | + |
| 25 | +@runtime_checkable |
| 26 | +class iinfo_object[TDtype](Protocol): |
| 27 | + """Dataclass returned by `iinfo`.""" |
| 28 | + |
| 29 | + bits: int |
| 30 | + max: int |
| 31 | + min: int |
| 32 | + dtype: TDtype |
| 33 | + |
| 34 | + |
| 35 | +@runtime_checkable |
| 36 | +class finfo_object[TDtype](Protocol): |
| 37 | + """Dataclass returned by `finfo`.""" |
| 38 | + |
| 39 | + bits: int |
| 40 | + eps: float |
| 41 | + max: float |
| 42 | + min: float |
| 43 | + smallest_normal: float |
| 44 | + dtype: TDtype |
| 45 | + |
| 46 | + |
18 | 47 | @runtime_checkable |
19 | 48 | class Array[TPycapsule, TArray: Array, TDevice, TDtype, TEllipsis](Protocol): |
20 | 49 | def __init__(self: TArray) -> None: |
@@ -1195,18 +1224,6 @@ class can_cast[TArray: Array, TDtype](Protocol): |
1195 | 1224 | def __call__(self, from_: Union[TDtype, TArray], to: TDtype, /) -> bool: ... |
1196 | 1225 |
|
1197 | 1226 |
|
1198 | | -@runtime_checkable |
1199 | | -class finfo_object[TDtype](Protocol): |
1200 | | - """Dataclass returned by `finfo`.""" |
1201 | | - |
1202 | | - bits: int |
1203 | | - eps: float |
1204 | | - max: float |
1205 | | - min: float |
1206 | | - smallest_normal: float |
1207 | | - dtype: TDtype |
1208 | | - |
1209 | | - |
1210 | 1227 | @runtime_checkable |
1211 | 1228 | class finfo[TArray: Array, TDtype](Protocol): |
1212 | 1229 | """ |
@@ -1263,16 +1280,6 @@ class finfo[TArray: Array, TDtype](Protocol): |
1263 | 1280 | def __call__(self, type: Union[TDtype, TArray], /) -> finfo_object: ... |
1264 | 1281 |
|
1265 | 1282 |
|
1266 | | -@runtime_checkable |
1267 | | -class iinfo_object[TDtype](Protocol): |
1268 | | - """Dataclass returned by `iinfo`.""" |
1269 | | - |
1270 | | - bits: int |
1271 | | - max: int |
1272 | | - min: int |
1273 | | - dtype: TDtype |
1274 | | - |
1275 | | - |
1276 | 1283 | @runtime_checkable |
1277 | 1284 | class iinfo[TArray: Array, TDtype](Protocol): |
1278 | 1285 | """ |
@@ -1713,13 +1720,6 @@ class arange[TArray: Array, TDevice, TDtype](Protocol): |
1713 | 1720 | def __call__(self, start: Union[int, float], /, stop: Optional[Union[int, float]] = None, step: Union[int, float] = 1, *, dtype: Optional[TDtype] = None, device: Optional[TDevice] = None) -> TArray: ... |
1714 | 1721 |
|
1715 | 1722 |
|
1716 | | -@runtime_checkable |
1717 | | -class NestedSequence[T_t_co](Protocol): |
1718 | | - def __getitem__(self, key: int, /) -> "Union[T_t_co, NestedSequence[T_t_co]]": ... |
1719 | | - |
1720 | | - def __len__(self, /) -> int: ... |
1721 | | - |
1722 | | - |
1723 | 1723 | @runtime_checkable |
1724 | 1724 | class asarray[TSupportsbufferprotocol, TArray: Array, TDevice, TDtype](Protocol): |
1725 | 1725 | r""" |
@@ -7383,51 +7383,6 @@ class unique_values[TArray: Array](Protocol): |
7383 | 7383 | def __call__(self, x: TArray, /) -> TArray: ... |
7384 | 7384 |
|
7385 | 7385 |
|
7386 | | -@runtime_checkable |
7387 | | -class LinalgNamespace[TArray: Array, TDtype](Protocol): |
7388 | | - cholesky: cholesky[TArray,] |
7389 | | - cross: cross[TArray,] |
7390 | | - det: det[TArray,] |
7391 | | - diagonal: diagonal[TArray,] |
7392 | | - eigh: eigh[TArray,] |
7393 | | - eigvalsh: eigvalsh[TArray,] |
7394 | | - inv: inv[TArray,] |
7395 | | - matmul: matmul[TArray,] |
7396 | | - matrix_norm: matrix_norm[TArray,] |
7397 | | - matrix_power: matrix_power[TArray,] |
7398 | | - matrix_rank: matrix_rank[TArray,] |
7399 | | - matrix_transpose: matrix_transpose[TArray,] |
7400 | | - outer: outer[TArray,] |
7401 | | - pinv: pinv[TArray,] |
7402 | | - qr: qr[TArray,] |
7403 | | - slogdet: slogdet[TArray,] |
7404 | | - solve: solve[TArray,] |
7405 | | - svd: svd[TArray,] |
7406 | | - svdvals: svdvals[TArray,] |
7407 | | - tensordot: tensordot[TArray,] |
7408 | | - trace: trace[TArray, TDtype] |
7409 | | - vecdot: vecdot[TArray,] |
7410 | | - vector_norm: vector_norm[TArray,] |
7411 | | - |
7412 | | - |
7413 | | -@runtime_checkable |
7414 | | -class FftNamespace[TArray: Array, TDevice](Protocol): |
7415 | | - fft: fft[TArray,] |
7416 | | - ifft: ifft[TArray,] |
7417 | | - fftn: fftn[TArray,] |
7418 | | - ifftn: ifftn[TArray,] |
7419 | | - rfft: rfft[TArray,] |
7420 | | - irfft: irfft[TArray,] |
7421 | | - rfftn: rfftn[TArray,] |
7422 | | - irfftn: irfftn[TArray,] |
7423 | | - hfft: hfft[TArray,] |
7424 | | - ihfft: ihfft[TArray,] |
7425 | | - fftfreq: fftfreq[TArray, TDevice] |
7426 | | - rfftfreq: rfftfreq[TArray, TDevice] |
7427 | | - fftshift: fftshift[TArray,] |
7428 | | - ifftshift: ifftshift[TArray,] |
7429 | | - |
7430 | | - |
7431 | 7386 | @runtime_checkable |
7432 | 7387 | class ArrayNamespace[TSupportsbufferprotocol, TArray: Array, TDevice, TDtype](Protocol): |
7433 | 7388 | astype: astype[TArray, TDtype] |
@@ -7542,18 +7497,81 @@ class ArrayNamespace[TSupportsbufferprotocol, TArray: Array, TDevice, TDtype](Pr |
7542 | 7497 | squeeze: squeeze[TArray,] |
7543 | 7498 | stack: stack[TArray,] |
7544 | 7499 | e: float |
| 7500 | + "\nIEEE 754 floating-point representation of Euler's constant.\n\n``e = 2.71828182845904523536028747135266249775724709369995...``\n" |
7545 | 7501 | inf: float |
| 7502 | + "\nIEEE 754 floating-point representation of (positive) infinity.\n" |
7546 | 7503 | nan: float |
| 7504 | + "\nIEEE 754 floating-point representation of Not a Number (``NaN``).\n" |
7547 | 7505 | newaxis: float |
| 7506 | + "\nAn alias for ``None`` which is useful for indexing arrays.\n" |
7548 | 7507 | pi: float |
| 7508 | + "\nIEEE 754 floating-point representation of the mathematical constant ``π``.\n\n``pi = 3.1415926535897932384626433...``\n" |
7549 | 7509 | unique_all: unique_all[TArray,] |
7550 | 7510 | unique_counts: unique_counts[TArray,] |
7551 | 7511 | unique_inverse: unique_inverse[TArray,] |
7552 | 7512 | unique_values: unique_values[TArray,] |
| 7513 | + bool: float |
| 7514 | + complex128: float |
| 7515 | + complex64: float |
| 7516 | + float32: float |
| 7517 | + float64: float |
| 7518 | + int16: float |
| 7519 | + int32: float |
| 7520 | + int64: float |
| 7521 | + int8: float |
| 7522 | + uint16: float |
| 7523 | + uint32: float |
| 7524 | + uint64: float |
| 7525 | + uint8: float |
| 7526 | + Device: TDevice |
| 7527 | + |
| 7528 | + |
| 7529 | +@runtime_checkable |
| 7530 | +class LinalgNamespace[TArray: Array, TDtype](Protocol): |
| 7531 | + cholesky: cholesky[TArray,] |
| 7532 | + cross: cross[TArray,] |
| 7533 | + det: det[TArray,] |
| 7534 | + diagonal: diagonal[TArray,] |
| 7535 | + eigh: eigh[TArray,] |
| 7536 | + eigvalsh: eigvalsh[TArray,] |
| 7537 | + inv: inv[TArray,] |
| 7538 | + matmul: matmul[TArray,] |
| 7539 | + matrix_norm: matrix_norm[TArray,] |
| 7540 | + matrix_power: matrix_power[TArray,] |
| 7541 | + matrix_rank: matrix_rank[TArray,] |
| 7542 | + matrix_transpose: matrix_transpose[TArray,] |
| 7543 | + outer: outer[TArray,] |
| 7544 | + pinv: pinv[TArray,] |
| 7545 | + qr: qr[TArray,] |
| 7546 | + slogdet: slogdet[TArray,] |
| 7547 | + solve: solve[TArray,] |
| 7548 | + svd: svd[TArray,] |
| 7549 | + svdvals: svdvals[TArray,] |
| 7550 | + tensordot: tensordot[TArray,] |
| 7551 | + trace: trace[TArray, TDtype] |
| 7552 | + vecdot: vecdot[TArray,] |
| 7553 | + vector_norm: vector_norm[TArray,] |
| 7554 | + |
| 7555 | + |
| 7556 | +@runtime_checkable |
| 7557 | +class FftNamespace[TArray: Array, TDevice](Protocol): |
| 7558 | + fft: fft[TArray,] |
| 7559 | + ifft: ifft[TArray,] |
| 7560 | + fftn: fftn[TArray,] |
| 7561 | + ifftn: ifftn[TArray,] |
| 7562 | + rfft: rfft[TArray,] |
| 7563 | + irfft: irfft[TArray,] |
| 7564 | + rfftn: rfftn[TArray,] |
| 7565 | + irfftn: irfftn[TArray,] |
| 7566 | + hfft: hfft[TArray,] |
| 7567 | + ihfft: ihfft[TArray,] |
| 7568 | + fftfreq: fftfreq[TArray, TDevice] |
| 7569 | + rfftfreq: rfftfreq[TArray, TDevice] |
| 7570 | + fftshift: fftshift[TArray,] |
| 7571 | + ifftshift: ifftshift[TArray,] |
| 7572 | + |
| 7573 | + |
| 7574 | +@runtime_checkable |
| 7575 | +class ArrayNamespaceFull[TSupportsbufferprotocol, TArray: Array, TDevice, TDtype](ArrayNamespace[TSupportsbufferprotocol, TArray, TDevice, TDtype], Protocol): |
7553 | 7576 | linalg: LinalgNamespace[TArray, TDtype] |
7554 | 7577 | fft: FftNamespace[TArray, TDevice] |
7555 | | - "\nIEEE 754 floating-point representation of Euler's constant.\n\n``e = 2.71828182845904523536028747135266249775724709369995...``\n" |
7556 | | - "\nIEEE 754 floating-point representation of (positive) infinity.\n" |
7557 | | - "\nIEEE 754 floating-point representation of Not a Number (``NaN``).\n" |
7558 | | - "\nAn alias for ``None`` which is useful for indexing arrays.\n" |
7559 | | - "\nIEEE 754 floating-point representation of the mathematical constant ``π``.\n\n``pi = 3.1415926535897932384626433...``\n" |
|
0 commit comments