summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/__init__.pyi18
1 files changed, 12 insertions, 6 deletions
diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi
index 6c40f7552..b708b99ab 100644
--- a/numpy/__init__.pyi
+++ b/numpy/__init__.pyi
@@ -1563,12 +1563,6 @@ class _ArrayOrScalarCommon:
keepdims: bool = ...,
) -> _NdArraySubClass: ...
- def repeat(
- self,
- repeats: _ArrayLikeInt_co,
- axis: Optional[SupportsIndex] = ...,
- ) -> ndarray: ...
-
@overload
def round(
self: _ArraySelf,
@@ -1829,6 +1823,12 @@ class ndarray(_ArrayOrScalarCommon, Generic[_ShapeType, _DType_co]):
mode: _ModeKind = ...,
) -> _NdArraySubClass: ...
+ def repeat(
+ self,
+ repeats: _ArrayLikeInt_co,
+ axis: Optional[SupportsIndex] = ...,
+ ) -> ndarray[Any, _DType_co]: ...
+
# Many of these special methods are irrelevant currently, since protocols
# aren't supported yet. That said, I'm adding them for completeness.
# https://docs.python.org/3/reference/datamodel.html
@@ -2821,6 +2821,12 @@ class generic(_ArrayOrScalarCommon):
mode: _ModeKind = ...,
) -> _NdArraySubClass: ...
+ def repeat(
+ self: _ScalarType,
+ repeats: _ArrayLikeInt_co,
+ axis: Optional[SupportsIndex] = ...,
+ ) -> ndarray[Any, dtype[_ScalarType]]: ...
+
def squeeze(
self: _ScalarType, axis: Union[Literal[0], Tuple[()]] = ...
) -> _ScalarType: ...