Skip to content

Commit db60ac4

Browse files
committed
✨ overloaded call signatures
1 parent 0bd5801 commit db60ac4

File tree

1 file changed

+42
-77
lines changed

1 file changed

+42
-77
lines changed

src/numpy-stubs/ma/core.pyi

Lines changed: 42 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,46 @@ class _frommethod:
859859
__doc__: str
860860
reversed: Incomplete
861861
def __init__(self, methodname: Incomplete, reversed: Incomplete = ...) -> None: ...
862-
def __call__(self, a: Incomplete, *args: Incomplete, **params: Incomplete) -> Incomplete: ...
862+
@overload
863+
def __call__(
864+
self,
865+
a: _ArrayT, # pyright: ignore[reportInvalidTypeVarUse]
866+
axis: None = None,
867+
fill_value: _ScalarLike_co | None = None,
868+
out: None = None,
869+
*,
870+
keepdims: L[False] | _NoValueType = ...,
871+
) -> intp: ...
872+
@overload
873+
def __call__(
874+
self,
875+
a: _ArrayT, # pyright: ignore[reportInvalidTypeVarUse]
876+
axis: CanIndex | None = None,
877+
fill_value: _ScalarLike_co | None = None,
878+
out: None = None,
879+
*,
880+
keepdims: bool | _NoValueType = ...,
881+
) -> Any: ...
882+
@overload
883+
def __call__(
884+
self,
885+
a: _ArrayT,
886+
axis: CanIndex | None = None,
887+
fill_value: _ScalarLike_co | None = None,
888+
*,
889+
out: _ArrayT,
890+
keepdims: bool | _NoValueType = ...,
891+
) -> _ArrayT: ...
892+
@overload
893+
def __call__(
894+
self,
895+
a: _ArrayT,
896+
axis: CanIndex | None,
897+
fill_value: _ScalarLike_co | None,
898+
out: _ArrayT,
899+
*,
900+
keepdims: bool | _NoValueType = ...,
901+
) -> _ArrayT: ...
863902
def getdoc(self) -> Incomplete: ...
864903

865904
class _convert2ma:
@@ -1125,81 +1164,7 @@ swapaxes: _frommethod
11251164
trace: _frommethod
11261165
var: _frommethod
11271166
count: _frommethod
1167+
argmin: _frommethod
1168+
argmax: _frommethod
11281169
minimum: _extrema_operation
11291170
maximum: _extrema_operation
1130-
1131-
#
1132-
@overload
1133-
def argmin(
1134-
a: _ArrayT, # pyright: ignore[reportInvalidTypeVarUse]
1135-
axis: None = None,
1136-
fill_value: _ScalarLike_co | None = None,
1137-
out: None = None,
1138-
*,
1139-
keepdims: L[False] | _NoValueType = ...,
1140-
) -> intp: ...
1141-
@overload
1142-
def argmin(
1143-
a: _ArrayT, # pyright: ignore[reportInvalidTypeVarUse]
1144-
axis: CanIndex | None = None,
1145-
fill_value: _ScalarLike_co | None = None,
1146-
out: None = None,
1147-
*,
1148-
keepdims: bool | _NoValueType = ...,
1149-
) -> Any: ...
1150-
@overload
1151-
def argmin(
1152-
a: _ArrayT,
1153-
axis: CanIndex | None = None,
1154-
fill_value: _ScalarLike_co | None = None,
1155-
*,
1156-
out: _ArrayT,
1157-
keepdims: bool | _NoValueType = ...,
1158-
) -> _ArrayT: ...
1159-
@overload
1160-
def argmin(
1161-
a: _ArrayT,
1162-
axis: CanIndex | None,
1163-
fill_value: _ScalarLike_co | None,
1164-
out: _ArrayT,
1165-
*,
1166-
keepdims: bool | _NoValueType = ...,
1167-
) -> _ArrayT: ...
1168-
1169-
#
1170-
@overload
1171-
def argmax(
1172-
a: _ArrayT, # pyright: ignore[reportInvalidTypeVarUse]
1173-
axis: None = None,
1174-
fill_value: _ScalarLike_co | None = None,
1175-
out: None = None,
1176-
*,
1177-
keepdims: L[False] | _NoValueType = ...,
1178-
) -> intp: ...
1179-
@overload
1180-
def argmax(
1181-
a: _ArrayT, # pyright: ignore[reportInvalidTypeVarUse]
1182-
axis: CanIndex | None = None,
1183-
fill_value: _ScalarLike_co | None = None,
1184-
out: None = None,
1185-
*,
1186-
keepdims: bool | _NoValueType = ...,
1187-
) -> Any: ...
1188-
@overload
1189-
def argmax(
1190-
a: _ArrayT,
1191-
axis: CanIndex | None = None,
1192-
fill_value: _ScalarLike_co | None = None,
1193-
*,
1194-
out: _ArrayT,
1195-
keepdims: bool | _NoValueType = ...,
1196-
) -> _ArrayT: ...
1197-
@overload
1198-
def argmax(
1199-
a: _ArrayT,
1200-
axis: CanIndex | None,
1201-
fill_value: _ScalarLike_co | None,
1202-
out: _ArrayT,
1203-
*,
1204-
keepdims: bool | _NoValueType = ...,
1205-
) -> _ArrayT: ...

0 commit comments

Comments
 (0)