fromnumeric.pyi
1 import datetime as dt 2 from collections.abc import Sequence 3 from typing import Union, Any, overload, TypeVar, Literal, SupportsIndex 4 5 from numpy import ( 6 ndarray, 7 number, 8 uint64, 9 int_, 10 int64, 11 intp, 12 float16, 13 bool_, 14 floating, 15 complexfloating, 16 object_, 17 generic, 18 _OrderKACF, 19 _OrderACF, 20 _ModeKind, 21 _PartitionKind, 22 _SortKind, 23 _SortSide, 24 ) 25 from numpy._typing import ( 26 DTypeLike, 27 _DTypeLike, 28 ArrayLike, 29 _ArrayLike, 30 NDArray, 31 _ShapeLike, 32 _Shape, 33 _ArrayLikeBool_co, 34 _ArrayLikeUInt_co, 35 _ArrayLikeInt_co, 36 _ArrayLikeFloat_co, 37 _ArrayLikeComplex_co, 38 _ArrayLikeObject_co, 39 _IntLike_co, 40 _BoolLike_co, 41 _ComplexLike_co, 42 _NumberLike_co, 43 _ScalarLike_co, 44 ) 45 46 _SCT = TypeVar("_SCT", bound=generic) 47 _SCT_uifcO = TypeVar("_SCT_uifcO", bound=number[Any] | object_) 48 _ArrayType = TypeVar("_ArrayType", bound=NDArray[Any]) 49 50 __all__: list[str] 51 52 @overload 53 def take( 54 a: _ArrayLike[_SCT], 55 indices: _IntLike_co, 56 axis: None = ..., 57 out: None = ..., 58 mode: _ModeKind = ..., 59 ) -> _SCT: ... 60 @overload 61 def take( 62 a: ArrayLike, 63 indices: _IntLike_co, 64 axis: None | SupportsIndex = ..., 65 out: None = ..., 66 mode: _ModeKind = ..., 67 ) -> Any: ... 68 @overload 69 def take( 70 a: _ArrayLike[_SCT], 71 indices: _ArrayLikeInt_co, 72 axis: None | SupportsIndex = ..., 73 out: None = ..., 74 mode: _ModeKind = ..., 75 ) -> NDArray[_SCT]: ... 76 @overload 77 def take( 78 a: ArrayLike, 79 indices: _ArrayLikeInt_co, 80 axis: None | SupportsIndex = ..., 81 out: None = ..., 82 mode: _ModeKind = ..., 83 ) -> NDArray[Any]: ... 84 @overload 85 def take( 86 a: ArrayLike, 87 indices: _ArrayLikeInt_co, 88 axis: None | SupportsIndex = ..., 89 out: _ArrayType = ..., 90 mode: _ModeKind = ..., 91 ) -> _ArrayType: ... 92 93 @overload 94 def reshape( 95 a: _ArrayLike[_SCT], 96 newshape: _ShapeLike, 97 order: _OrderACF = ..., 98 ) -> NDArray[_SCT]: ... 99 @overload 100 def reshape( 101 a: ArrayLike, 102 newshape: _ShapeLike, 103 order: _OrderACF = ..., 104 ) -> NDArray[Any]: ... 105 106 @overload 107 def choose( 108 a: _IntLike_co, 109 choices: ArrayLike, 110 out: None = ..., 111 mode: _ModeKind = ..., 112 ) -> Any: ... 113 @overload 114 def choose( 115 a: _ArrayLikeInt_co, 116 choices: _ArrayLike[_SCT], 117 out: None = ..., 118 mode: _ModeKind = ..., 119 ) -> NDArray[_SCT]: ... 120 @overload 121 def choose( 122 a: _ArrayLikeInt_co, 123 choices: ArrayLike, 124 out: None = ..., 125 mode: _ModeKind = ..., 126 ) -> NDArray[Any]: ... 127 @overload 128 def choose( 129 a: _ArrayLikeInt_co, 130 choices: ArrayLike, 131 out: _ArrayType = ..., 132 mode: _ModeKind = ..., 133 ) -> _ArrayType: ... 134 135 @overload 136 def repeat( 137 a: _ArrayLike[_SCT], 138 repeats: _ArrayLikeInt_co, 139 axis: None | SupportsIndex = ..., 140 ) -> NDArray[_SCT]: ... 141 @overload 142 def repeat( 143 a: ArrayLike, 144 repeats: _ArrayLikeInt_co, 145 axis: None | SupportsIndex = ..., 146 ) -> NDArray[Any]: ... 147 148 def put( 149 a: NDArray[Any], 150 ind: _ArrayLikeInt_co, 151 v: ArrayLike, 152 mode: _ModeKind = ..., 153 ) -> None: ... 154 155 @overload 156 def swapaxes( 157 a: _ArrayLike[_SCT], 158 axis1: SupportsIndex, 159 axis2: SupportsIndex, 160 ) -> NDArray[_SCT]: ... 161 @overload 162 def swapaxes( 163 a: ArrayLike, 164 axis1: SupportsIndex, 165 axis2: SupportsIndex, 166 ) -> NDArray[Any]: ... 167 168 @overload 169 def transpose( 170 a: _ArrayLike[_SCT], 171 axes: None | _ShapeLike = ... 172 ) -> NDArray[_SCT]: ... 173 @overload 174 def transpose( 175 a: ArrayLike, 176 axes: None | _ShapeLike = ... 177 ) -> NDArray[Any]: ... 178 179 @overload 180 def partition( 181 a: _ArrayLike[_SCT], 182 kth: _ArrayLikeInt_co, 183 axis: None | SupportsIndex = ..., 184 kind: _PartitionKind = ..., 185 order: None | str | Sequence[str] = ..., 186 ) -> NDArray[_SCT]: ... 187 @overload 188 def partition( 189 a: ArrayLike, 190 kth: _ArrayLikeInt_co, 191 axis: None | SupportsIndex = ..., 192 kind: _PartitionKind = ..., 193 order: None | str | Sequence[str] = ..., 194 ) -> NDArray[Any]: ... 195 196 def argpartition( 197 a: ArrayLike, 198 kth: _ArrayLikeInt_co, 199 axis: None | SupportsIndex = ..., 200 kind: _PartitionKind = ..., 201 order: None | str | Sequence[str] = ..., 202 ) -> NDArray[intp]: ... 203 204 @overload 205 def sort( 206 a: _ArrayLike[_SCT], 207 axis: None | SupportsIndex = ..., 208 kind: None | _SortKind = ..., 209 order: None | str | Sequence[str] = ..., 210 ) -> NDArray[_SCT]: ... 211 @overload 212 def sort( 213 a: ArrayLike, 214 axis: None | SupportsIndex = ..., 215 kind: None | _SortKind = ..., 216 order: None | str | Sequence[str] = ..., 217 ) -> NDArray[Any]: ... 218 219 def argsort( 220 a: ArrayLike, 221 axis: None | SupportsIndex = ..., 222 kind: None | _SortKind = ..., 223 order: None | str | Sequence[str] = ..., 224 ) -> NDArray[intp]: ... 225 226 @overload 227 def argmax( 228 a: ArrayLike, 229 axis: None = ..., 230 out: None = ..., 231 *, 232 keepdims: Literal[False] = ..., 233 ) -> intp: ... 234 @overload 235 def argmax( 236 a: ArrayLike, 237 axis: None | SupportsIndex = ..., 238 out: None = ..., 239 *, 240 keepdims: bool = ..., 241 ) -> Any: ... 242 @overload 243 def argmax( 244 a: ArrayLike, 245 axis: None | SupportsIndex = ..., 246 out: _ArrayType = ..., 247 *, 248 keepdims: bool = ..., 249 ) -> _ArrayType: ... 250 251 @overload 252 def argmin( 253 a: ArrayLike, 254 axis: None = ..., 255 out: None = ..., 256 *, 257 keepdims: Literal[False] = ..., 258 ) -> intp: ... 259 @overload 260 def argmin( 261 a: ArrayLike, 262 axis: None | SupportsIndex = ..., 263 out: None = ..., 264 *, 265 keepdims: bool = ..., 266 ) -> Any: ... 267 @overload 268 def argmin( 269 a: ArrayLike, 270 axis: None | SupportsIndex = ..., 271 out: _ArrayType = ..., 272 *, 273 keepdims: bool = ..., 274 ) -> _ArrayType: ... 275 276 @overload 277 def searchsorted( 278 a: ArrayLike, 279 v: _ScalarLike_co, 280 side: _SortSide = ..., 281 sorter: None | _ArrayLikeInt_co = ..., # 1D int array 282 ) -> intp: ... 283 @overload 284 def searchsorted( 285 a: ArrayLike, 286 v: ArrayLike, 287 side: _SortSide = ..., 288 sorter: None | _ArrayLikeInt_co = ..., # 1D int array 289 ) -> NDArray[intp]: ... 290 291 @overload 292 def resize( 293 a: _ArrayLike[_SCT], 294 new_shape: _ShapeLike, 295 ) -> NDArray[_SCT]: ... 296 @overload 297 def resize( 298 a: ArrayLike, 299 new_shape: _ShapeLike, 300 ) -> NDArray[Any]: ... 301 302 @overload 303 def squeeze( 304 a: _SCT, 305 axis: None | _ShapeLike = ..., 306 ) -> _SCT: ... 307 @overload 308 def squeeze( 309 a: _ArrayLike[_SCT], 310 axis: None | _ShapeLike = ..., 311 ) -> NDArray[_SCT]: ... 312 @overload 313 def squeeze( 314 a: ArrayLike, 315 axis: None | _ShapeLike = ..., 316 ) -> NDArray[Any]: ... 317 318 @overload 319 def diagonal( 320 a: _ArrayLike[_SCT], 321 offset: SupportsIndex = ..., 322 axis1: SupportsIndex = ..., 323 axis2: SupportsIndex = ..., # >= 2D array 324 ) -> NDArray[_SCT]: ... 325 @overload 326 def diagonal( 327 a: ArrayLike, 328 offset: SupportsIndex = ..., 329 axis1: SupportsIndex = ..., 330 axis2: SupportsIndex = ..., # >= 2D array 331 ) -> NDArray[Any]: ... 332 333 @overload 334 def trace( 335 a: ArrayLike, # >= 2D array 336 offset: SupportsIndex = ..., 337 axis1: SupportsIndex = ..., 338 axis2: SupportsIndex = ..., 339 dtype: DTypeLike = ..., 340 out: None = ..., 341 ) -> Any: ... 342 @overload 343 def trace( 344 a: ArrayLike, # >= 2D array 345 offset: SupportsIndex = ..., 346 axis1: SupportsIndex = ..., 347 axis2: SupportsIndex = ..., 348 dtype: DTypeLike = ..., 349 out: _ArrayType = ..., 350 ) -> _ArrayType: ... 351 352 @overload 353 def ravel(a: _ArrayLike[_SCT], order: _OrderKACF = ...) -> NDArray[_SCT]: ... 354 @overload 355 def ravel(a: ArrayLike, order: _OrderKACF = ...) -> NDArray[Any]: ... 356 357 def nonzero(a: ArrayLike) -> tuple[NDArray[intp], ...]: ... 358 359 def shape(a: ArrayLike) -> _Shape: ... 360 361 @overload 362 def compress( 363 condition: _ArrayLikeBool_co, # 1D bool array 364 a: _ArrayLike[_SCT], 365 axis: None | SupportsIndex = ..., 366 out: None = ..., 367 ) -> NDArray[_SCT]: ... 368 @overload 369 def compress( 370 condition: _ArrayLikeBool_co, # 1D bool array 371 a: ArrayLike, 372 axis: None | SupportsIndex = ..., 373 out: None = ..., 374 ) -> NDArray[Any]: ... 375 @overload 376 def compress( 377 condition: _ArrayLikeBool_co, # 1D bool array 378 a: ArrayLike, 379 axis: None | SupportsIndex = ..., 380 out: _ArrayType = ..., 381 ) -> _ArrayType: ... 382 383 @overload 384 def clip( 385 a: _SCT, 386 a_min: None | ArrayLike, 387 a_max: None | ArrayLike, 388 out: None = ..., 389 *, 390 dtype: None = ..., 391 where: None | _ArrayLikeBool_co = ..., 392 order: _OrderKACF = ..., 393 subok: bool = ..., 394 signature: str | tuple[None | str, ...] = ..., 395 extobj: list[Any] = ..., 396 ) -> _SCT: ... 397 @overload 398 def clip( 399 a: _ScalarLike_co, 400 a_min: None | ArrayLike, 401 a_max: None | ArrayLike, 402 out: None = ..., 403 *, 404 dtype: None = ..., 405 where: None | _ArrayLikeBool_co = ..., 406 order: _OrderKACF = ..., 407 subok: bool = ..., 408 signature: str | tuple[None | str, ...] = ..., 409 extobj: list[Any] = ..., 410 ) -> Any: ... 411 @overload 412 def clip( 413 a: _ArrayLike[_SCT], 414 a_min: None | ArrayLike, 415 a_max: None | ArrayLike, 416 out: None = ..., 417 *, 418 dtype: None = ..., 419 where: None | _ArrayLikeBool_co = ..., 420 order: _OrderKACF = ..., 421 subok: bool = ..., 422 signature: str | tuple[None | str, ...] = ..., 423 extobj: list[Any] = ..., 424 ) -> NDArray[_SCT]: ... 425 @overload 426 def clip( 427 a: ArrayLike, 428 a_min: None | ArrayLike, 429 a_max: None | ArrayLike, 430 out: None = ..., 431 *, 432 dtype: None = ..., 433 where: None | _ArrayLikeBool_co = ..., 434 order: _OrderKACF = ..., 435 subok: bool = ..., 436 signature: str | tuple[None | str, ...] = ..., 437 extobj: list[Any] = ..., 438 ) -> NDArray[Any]: ... 439 @overload 440 def clip( 441 a: ArrayLike, 442 a_min: None | ArrayLike, 443 a_max: None | ArrayLike, 444 out: _ArrayType = ..., 445 *, 446 dtype: DTypeLike, 447 where: None | _ArrayLikeBool_co = ..., 448 order: _OrderKACF = ..., 449 subok: bool = ..., 450 signature: str | tuple[None | str, ...] = ..., 451 extobj: list[Any] = ..., 452 ) -> Any: ... 453 @overload 454 def clip( 455 a: ArrayLike, 456 a_min: None | ArrayLike, 457 a_max: None | ArrayLike, 458 out: _ArrayType, 459 *, 460 dtype: DTypeLike = ..., 461 where: None | _ArrayLikeBool_co = ..., 462 order: _OrderKACF = ..., 463 subok: bool = ..., 464 signature: str | tuple[None | str, ...] = ..., 465 extobj: list[Any] = ..., 466 ) -> _ArrayType: ... 467 468 @overload 469 def sum( 470 a: _ArrayLike[_SCT], 471 axis: None = ..., 472 dtype: None = ..., 473 out: None = ..., 474 keepdims: bool = ..., 475 initial: _NumberLike_co = ..., 476 where: _ArrayLikeBool_co = ..., 477 ) -> _SCT: ... 478 @overload 479 def sum( 480 a: ArrayLike, 481 axis: None | _ShapeLike = ..., 482 dtype: DTypeLike = ..., 483 out: None = ..., 484 keepdims: bool = ..., 485 initial: _NumberLike_co = ..., 486 where: _ArrayLikeBool_co = ..., 487 ) -> Any: ... 488 @overload 489 def sum( 490 a: ArrayLike, 491 axis: None | _ShapeLike = ..., 492 dtype: DTypeLike = ..., 493 out: _ArrayType = ..., 494 keepdims: bool = ..., 495 initial: _NumberLike_co = ..., 496 where: _ArrayLikeBool_co = ..., 497 ) -> _ArrayType: ... 498 499 @overload 500 def all( 501 a: ArrayLike, 502 axis: None = ..., 503 out: None = ..., 504 keepdims: Literal[False] = ..., 505 *, 506 where: _ArrayLikeBool_co = ..., 507 ) -> bool_: ... 508 @overload 509 def all( 510 a: ArrayLike, 511 axis: None | _ShapeLike = ..., 512 out: None = ..., 513 keepdims: bool = ..., 514 *, 515 where: _ArrayLikeBool_co = ..., 516 ) -> Any: ... 517 @overload 518 def all( 519 a: ArrayLike, 520 axis: None | _ShapeLike = ..., 521 out: _ArrayType = ..., 522 keepdims: bool = ..., 523 *, 524 where: _ArrayLikeBool_co = ..., 525 ) -> _ArrayType: ... 526 527 @overload 528 def any( 529 a: ArrayLike, 530 axis: None = ..., 531 out: None = ..., 532 keepdims: Literal[False] = ..., 533 *, 534 where: _ArrayLikeBool_co = ..., 535 ) -> bool_: ... 536 @overload 537 def any( 538 a: ArrayLike, 539 axis: None | _ShapeLike = ..., 540 out: None = ..., 541 keepdims: bool = ..., 542 *, 543 where: _ArrayLikeBool_co = ..., 544 ) -> Any: ... 545 @overload 546 def any( 547 a: ArrayLike, 548 axis: None | _ShapeLike = ..., 549 out: _ArrayType = ..., 550 keepdims: bool = ..., 551 *, 552 where: _ArrayLikeBool_co = ..., 553 ) -> _ArrayType: ... 554 555 @overload 556 def cumsum( 557 a: _ArrayLike[_SCT], 558 axis: None | SupportsIndex = ..., 559 dtype: None = ..., 560 out: None = ..., 561 ) -> NDArray[_SCT]: ... 562 @overload 563 def cumsum( 564 a: ArrayLike, 565 axis: None | SupportsIndex = ..., 566 dtype: None = ..., 567 out: None = ..., 568 ) -> NDArray[Any]: ... 569 @overload 570 def cumsum( 571 a: ArrayLike, 572 axis: None | SupportsIndex = ..., 573 dtype: _DTypeLike[_SCT] = ..., 574 out: None = ..., 575 ) -> NDArray[_SCT]: ... 576 @overload 577 def cumsum( 578 a: ArrayLike, 579 axis: None | SupportsIndex = ..., 580 dtype: DTypeLike = ..., 581 out: None = ..., 582 ) -> NDArray[Any]: ... 583 @overload 584 def cumsum( 585 a: ArrayLike, 586 axis: None | SupportsIndex = ..., 587 dtype: DTypeLike = ..., 588 out: _ArrayType = ..., 589 ) -> _ArrayType: ... 590 591 @overload 592 def ptp( 593 a: _ArrayLike[_SCT], 594 axis: None = ..., 595 out: None = ..., 596 keepdims: Literal[False] = ..., 597 ) -> _SCT: ... 598 @overload 599 def ptp( 600 a: ArrayLike, 601 axis: None | _ShapeLike = ..., 602 out: None = ..., 603 keepdims: bool = ..., 604 ) -> Any: ... 605 @overload 606 def ptp( 607 a: ArrayLike, 608 axis: None | _ShapeLike = ..., 609 out: _ArrayType = ..., 610 keepdims: bool = ..., 611 ) -> _ArrayType: ... 612 613 @overload 614 def amax( 615 a: _ArrayLike[_SCT], 616 axis: None = ..., 617 out: None = ..., 618 keepdims: Literal[False] = ..., 619 initial: _NumberLike_co = ..., 620 where: _ArrayLikeBool_co = ..., 621 ) -> _SCT: ... 622 @overload 623 def amax( 624 a: ArrayLike, 625 axis: None | _ShapeLike = ..., 626 out: None = ..., 627 keepdims: bool = ..., 628 initial: _NumberLike_co = ..., 629 where: _ArrayLikeBool_co = ..., 630 ) -> Any: ... 631 @overload 632 def amax( 633 a: ArrayLike, 634 axis: None | _ShapeLike = ..., 635 out: _ArrayType = ..., 636 keepdims: bool = ..., 637 initial: _NumberLike_co = ..., 638 where: _ArrayLikeBool_co = ..., 639 ) -> _ArrayType: ... 640 641 @overload 642 def amin( 643 a: _ArrayLike[_SCT], 644 axis: None = ..., 645 out: None = ..., 646 keepdims: Literal[False] = ..., 647 initial: _NumberLike_co = ..., 648 where: _ArrayLikeBool_co = ..., 649 ) -> _SCT: ... 650 @overload 651 def amin( 652 a: ArrayLike, 653 axis: None | _ShapeLike = ..., 654 out: None = ..., 655 keepdims: bool = ..., 656 initial: _NumberLike_co = ..., 657 where: _ArrayLikeBool_co = ..., 658 ) -> Any: ... 659 @overload 660 def amin( 661 a: ArrayLike, 662 axis: None | _ShapeLike = ..., 663 out: _ArrayType = ..., 664 keepdims: bool = ..., 665 initial: _NumberLike_co = ..., 666 where: _ArrayLikeBool_co = ..., 667 ) -> _ArrayType: ... 668 669 # TODO: `np.prod()``: For object arrays `initial` does not necessarily 670 # have to be a numerical scalar. 671 # The only requirement is that it is compatible 672 # with the `.__mul__()` method(s) of the passed array's elements. 673 674 # Note that the same situation holds for all wrappers around 675 # `np.ufunc.reduce`, e.g. `np.sum()` (`.__add__()`). 676 @overload 677 def prod( 678 a: _ArrayLikeBool_co, 679 axis: None = ..., 680 dtype: None = ..., 681 out: None = ..., 682 keepdims: Literal[False] = ..., 683 initial: _NumberLike_co = ..., 684 where: _ArrayLikeBool_co = ..., 685 ) -> int_: ... 686 @overload 687 def prod( 688 a: _ArrayLikeUInt_co, 689 axis: None = ..., 690 dtype: None = ..., 691 out: None = ..., 692 keepdims: Literal[False] = ..., 693 initial: _NumberLike_co = ..., 694 where: _ArrayLikeBool_co = ..., 695 ) -> uint64: ... 696 @overload 697 def prod( 698 a: _ArrayLikeInt_co, 699 axis: None = ..., 700 dtype: None = ..., 701 out: None = ..., 702 keepdims: Literal[False] = ..., 703 initial: _NumberLike_co = ..., 704 where: _ArrayLikeBool_co = ..., 705 ) -> int64: ... 706 @overload 707 def prod( 708 a: _ArrayLikeFloat_co, 709 axis: None = ..., 710 dtype: None = ..., 711 out: None = ..., 712 keepdims: Literal[False] = ..., 713 initial: _NumberLike_co = ..., 714 where: _ArrayLikeBool_co = ..., 715 ) -> floating[Any]: ... 716 @overload 717 def prod( 718 a: _ArrayLikeComplex_co, 719 axis: None = ..., 720 dtype: None = ..., 721 out: None = ..., 722 keepdims: Literal[False] = ..., 723 initial: _NumberLike_co = ..., 724 where: _ArrayLikeBool_co = ..., 725 ) -> complexfloating[Any, Any]: ... 726 @overload 727 def prod( 728 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 729 axis: None | _ShapeLike = ..., 730 dtype: None = ..., 731 out: None = ..., 732 keepdims: bool = ..., 733 initial: _NumberLike_co = ..., 734 where: _ArrayLikeBool_co = ..., 735 ) -> Any: ... 736 @overload 737 def prod( 738 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 739 axis: None = ..., 740 dtype: _DTypeLike[_SCT] = ..., 741 out: None = ..., 742 keepdims: Literal[False] = ..., 743 initial: _NumberLike_co = ..., 744 where: _ArrayLikeBool_co = ..., 745 ) -> _SCT: ... 746 @overload 747 def prod( 748 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 749 axis: None | _ShapeLike = ..., 750 dtype: None | DTypeLike = ..., 751 out: None = ..., 752 keepdims: bool = ..., 753 initial: _NumberLike_co = ..., 754 where: _ArrayLikeBool_co = ..., 755 ) -> Any: ... 756 @overload 757 def prod( 758 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 759 axis: None | _ShapeLike = ..., 760 dtype: None | DTypeLike = ..., 761 out: _ArrayType = ..., 762 keepdims: bool = ..., 763 initial: _NumberLike_co = ..., 764 where: _ArrayLikeBool_co = ..., 765 ) -> _ArrayType: ... 766 767 @overload 768 def cumprod( 769 a: _ArrayLikeBool_co, 770 axis: None | SupportsIndex = ..., 771 dtype: None = ..., 772 out: None = ..., 773 ) -> NDArray[int_]: ... 774 @overload 775 def cumprod( 776 a: _ArrayLikeUInt_co, 777 axis: None | SupportsIndex = ..., 778 dtype: None = ..., 779 out: None = ..., 780 ) -> NDArray[uint64]: ... 781 @overload 782 def cumprod( 783 a: _ArrayLikeInt_co, 784 axis: None | SupportsIndex = ..., 785 dtype: None = ..., 786 out: None = ..., 787 ) -> NDArray[int64]: ... 788 @overload 789 def cumprod( 790 a: _ArrayLikeFloat_co, 791 axis: None | SupportsIndex = ..., 792 dtype: None = ..., 793 out: None = ..., 794 ) -> NDArray[floating[Any]]: ... 795 @overload 796 def cumprod( 797 a: _ArrayLikeComplex_co, 798 axis: None | SupportsIndex = ..., 799 dtype: None = ..., 800 out: None = ..., 801 ) -> NDArray[complexfloating[Any, Any]]: ... 802 @overload 803 def cumprod( 804 a: _ArrayLikeObject_co, 805 axis: None | SupportsIndex = ..., 806 dtype: None = ..., 807 out: None = ..., 808 ) -> NDArray[object_]: ... 809 @overload 810 def cumprod( 811 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 812 axis: None | SupportsIndex = ..., 813 dtype: _DTypeLike[_SCT] = ..., 814 out: None = ..., 815 ) -> NDArray[_SCT]: ... 816 @overload 817 def cumprod( 818 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 819 axis: None | SupportsIndex = ..., 820 dtype: DTypeLike = ..., 821 out: None = ..., 822 ) -> NDArray[Any]: ... 823 @overload 824 def cumprod( 825 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 826 axis: None | SupportsIndex = ..., 827 dtype: DTypeLike = ..., 828 out: _ArrayType = ..., 829 ) -> _ArrayType: ... 830 831 def ndim(a: ArrayLike) -> int: ... 832 833 def size(a: ArrayLike, axis: None | int = ...) -> int: ... 834 835 @overload 836 def around( 837 a: _BoolLike_co, 838 decimals: SupportsIndex = ..., 839 out: None = ..., 840 ) -> float16: ... 841 @overload 842 def around( 843 a: _SCT_uifcO, 844 decimals: SupportsIndex = ..., 845 out: None = ..., 846 ) -> _SCT_uifcO: ... 847 @overload 848 def around( 849 a: _ComplexLike_co | object_, 850 decimals: SupportsIndex = ..., 851 out: None = ..., 852 ) -> Any: ... 853 @overload 854 def around( 855 a: _ArrayLikeBool_co, 856 decimals: SupportsIndex = ..., 857 out: None = ..., 858 ) -> NDArray[float16]: ... 859 @overload 860 def around( 861 a: _ArrayLike[_SCT_uifcO], 862 decimals: SupportsIndex = ..., 863 out: None = ..., 864 ) -> NDArray[_SCT_uifcO]: ... 865 @overload 866 def around( 867 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 868 decimals: SupportsIndex = ..., 869 out: None = ..., 870 ) -> NDArray[Any]: ... 871 @overload 872 def around( 873 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 874 decimals: SupportsIndex = ..., 875 out: _ArrayType = ..., 876 ) -> _ArrayType: ... 877 878 @overload 879 def mean( 880 a: _ArrayLikeFloat_co, 881 axis: None = ..., 882 dtype: None = ..., 883 out: None = ..., 884 keepdims: Literal[False] = ..., 885 *, 886 where: _ArrayLikeBool_co = ..., 887 ) -> floating[Any]: ... 888 @overload 889 def mean( 890 a: _ArrayLikeComplex_co, 891 axis: None = ..., 892 dtype: None = ..., 893 out: None = ..., 894 keepdims: Literal[False] = ..., 895 *, 896 where: _ArrayLikeBool_co = ..., 897 ) -> complexfloating[Any, Any]: ... 898 @overload 899 def mean( 900 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 901 axis: None | _ShapeLike = ..., 902 dtype: None = ..., 903 out: None = ..., 904 keepdims: bool = ..., 905 *, 906 where: _ArrayLikeBool_co = ..., 907 ) -> Any: ... 908 @overload 909 def mean( 910 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 911 axis: None = ..., 912 dtype: _DTypeLike[_SCT] = ..., 913 out: None = ..., 914 keepdims: Literal[False] = ..., 915 *, 916 where: _ArrayLikeBool_co = ..., 917 ) -> _SCT: ... 918 @overload 919 def mean( 920 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 921 axis: None | _ShapeLike = ..., 922 dtype: DTypeLike = ..., 923 out: None = ..., 924 keepdims: bool = ..., 925 *, 926 where: _ArrayLikeBool_co = ..., 927 ) -> Any: ... 928 @overload 929 def mean( 930 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 931 axis: None | _ShapeLike = ..., 932 dtype: DTypeLike = ..., 933 out: _ArrayType = ..., 934 keepdims: bool = ..., 935 *, 936 where: _ArrayLikeBool_co = ..., 937 ) -> _ArrayType: ... 938 939 @overload 940 def std( 941 a: _ArrayLikeComplex_co, 942 axis: None = ..., 943 dtype: None = ..., 944 out: None = ..., 945 ddof: float = ..., 946 keepdims: Literal[False] = ..., 947 *, 948 where: _ArrayLikeBool_co = ..., 949 ) -> floating[Any]: ... 950 @overload 951 def std( 952 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 953 axis: None | _ShapeLike = ..., 954 dtype: None = ..., 955 out: None = ..., 956 ddof: float = ..., 957 keepdims: bool = ..., 958 *, 959 where: _ArrayLikeBool_co = ..., 960 ) -> Any: ... 961 @overload 962 def std( 963 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 964 axis: None = ..., 965 dtype: _DTypeLike[_SCT] = ..., 966 out: None = ..., 967 ddof: float = ..., 968 keepdims: Literal[False] = ..., 969 *, 970 where: _ArrayLikeBool_co = ..., 971 ) -> _SCT: ... 972 @overload 973 def std( 974 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 975 axis: None | _ShapeLike = ..., 976 dtype: DTypeLike = ..., 977 out: None = ..., 978 ddof: float = ..., 979 keepdims: bool = ..., 980 *, 981 where: _ArrayLikeBool_co = ..., 982 ) -> Any: ... 983 @overload 984 def std( 985 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 986 axis: None | _ShapeLike = ..., 987 dtype: DTypeLike = ..., 988 out: _ArrayType = ..., 989 ddof: float = ..., 990 keepdims: bool = ..., 991 *, 992 where: _ArrayLikeBool_co = ..., 993 ) -> _ArrayType: ... 994 995 @overload 996 def var( 997 a: _ArrayLikeComplex_co, 998 axis: None = ..., 999 dtype: None = ..., 1000 out: None = ..., 1001 ddof: float = ..., 1002 keepdims: Literal[False] = ..., 1003 *, 1004 where: _ArrayLikeBool_co = ..., 1005 ) -> floating[Any]: ... 1006 @overload 1007 def var( 1008 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 1009 axis: None | _ShapeLike = ..., 1010 dtype: None = ..., 1011 out: None = ..., 1012 ddof: float = ..., 1013 keepdims: bool = ..., 1014 *, 1015 where: _ArrayLikeBool_co = ..., 1016 ) -> Any: ... 1017 @overload 1018 def var( 1019 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 1020 axis: None = ..., 1021 dtype: _DTypeLike[_SCT] = ..., 1022 out: None = ..., 1023 ddof: float = ..., 1024 keepdims: Literal[False] = ..., 1025 *, 1026 where: _ArrayLikeBool_co = ..., 1027 ) -> _SCT: ... 1028 @overload 1029 def var( 1030 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 1031 axis: None | _ShapeLike = ..., 1032 dtype: DTypeLike = ..., 1033 out: None = ..., 1034 ddof: float = ..., 1035 keepdims: bool = ..., 1036 *, 1037 where: _ArrayLikeBool_co = ..., 1038 ) -> Any: ... 1039 @overload 1040 def var( 1041 a: _ArrayLikeComplex_co | _ArrayLikeObject_co, 1042 axis: None | _ShapeLike = ..., 1043 dtype: DTypeLike = ..., 1044 out: _ArrayType = ..., 1045 ddof: float = ..., 1046 keepdims: bool = ..., 1047 *, 1048 where: _ArrayLikeBool_co = ..., 1049 ) -> _ArrayType: ...