@@ -75,10 +75,6 @@ class _Kwargs3(_KwargsCommon, total=False):
7575 where: _ArrayLikeBool_co | None
7676 signature: _Tuple3[DTypeLike] | str | None
7777
78- @type_check_only
79- class _Kwargs3_g(_KwargsCommon, total=False):
80- signature: _Tuple3[DTypeLike] | str | None
81-
8278@type_check_only
8379class _Kwargs4(_KwargsCommon, total=False):
8480 where: _ArrayLikeBool_co | None
@@ -94,6 +90,18 @@ class _Kwargs4_(_KwargsCommon, total=False):
9490 where: _ArrayLikeBool_co | None
9591 signature: _Tuple4_[DTypeLike] | str | None
9692
93+ @type_check_only
94+ class _Kwargs2_g(_KwargsCommon, total=False):
95+ signature: _Tuple2[DTypeLike] | str | None
96+ axes: Sequence[_Tuple2[SupportsIndex]]
97+ axis: SupportsIndex
98+
99+ @type_check_only
100+ class _Kwargs3_g(_KwargsCommon, total=False):
101+ signature: _Tuple3[DTypeLike] | str | None
102+ axes: Sequence[_Tuple2[SupportsIndex]]
103+ axis: SupportsIndex
104+
97105###
98106# ufunc method signatures
99107
@@ -592,9 +600,119 @@ class _Call22(Protocol):
592600 **kwds: Unpack[_Kwargs4],
593601 ) -> _Tuple2[Any]: ...
594602
603+ @type_check_only
604+ class _Call11_g(Protocol):
605+ @overload
606+ def __call__(
607+ self,
608+ x: ArrayLike,
609+ /,
610+ out: _Out1[_ArrayT],
611+ *,
612+ dtype: None = None,
613+ **kwds: Unpack[_Kwargs2_g],
614+ ) -> _ArrayT: ...
615+ @overload
616+ def __call__(
617+ self,
618+ x: ArrayLike,
619+ /,
620+ out: _Out1[_AnyArray | None] = None,
621+ *,
622+ dtype: DTypeLike | None = None,
623+ **kwds: Unpack[_Kwargs2_g],
624+ ) -> Any: ...
625+
626+ @type_check_only
627+ class _Call12_g(Protocol):
628+ @overload
629+ def __call__(
630+ self,
631+ x: ArrayLike,
632+ out1: None = None,
633+ out2: None = None,
634+ /,
635+ out: _Tuple2[None] = (None, None),
636+ *,
637+ dtype: DTypeLike | None = None,
638+ **kwds: Unpack[_Kwargs3_g],
639+ ) -> tuple[Any, Any]: ...
640+ @overload
641+ def __call__(
642+ self,
643+ x: ArrayLike,
644+ out1: None = None,
645+ out2: None = None,
646+ /,
647+ *,
648+ out: tuple[None, _ArrayT2],
649+ dtype: None = None,
650+ **kwds: Unpack[_Kwargs3_g],
651+ ) -> tuple[Any, _ArrayT2]: ...
652+ @overload
653+ def __call__(
654+ self,
655+ x: ArrayLike,
656+ out1: None = None,
657+ out2: None = None,
658+ /,
659+ *,
660+ out: tuple[_ArrayT1, None],
661+ dtype: None = None,
662+ **kwds: Unpack[_Kwargs3_g],
663+ ) -> tuple[_ArrayT1, Any]: ...
664+ @overload
665+ def __call__(
666+ self,
667+ x: ArrayLike,
668+ out1: None = None,
669+ out2: None = None,
670+ /,
671+ *,
672+ out: tuple[_ArrayT1, _ArrayT2],
673+ dtype: None = None,
674+ **kwds: Unpack[_Kwargs3_g],
675+ ) -> tuple[_ArrayT1, _ArrayT2]: ...
676+ @overload
677+ def __call__(
678+ self,
679+ x: ArrayLike,
680+ out1: None,
681+ out2: _ArrayT2,
682+ /,
683+ *,
684+ out: _Tuple2[None] = (None, None),
685+ dtype: None = None,
686+ **kwds: Unpack[_Kwargs3_g],
687+ ) -> tuple[Any, _ArrayT2]: ...
688+ @overload
689+ def __call__(
690+ self,
691+ x: ArrayLike,
692+ out1: _ArrayT1,
693+ out2: None,
694+ /,
695+ *,
696+ out: _Tuple2[None] = (None, None),
697+ dtype: None = None,
698+ **kwds: Unpack[_Kwargs3_g],
699+ ) -> tuple[_ArrayT1, Any]: ...
700+ @overload
701+ def __call__(
702+ self,
703+ x: ArrayLike,
704+ out1: _ArrayT1,
705+ out2: _ArrayT2,
706+ /,
707+ *,
708+ out: _Tuple2[None] = (None, None),
709+ dtype: None = None,
710+ **kwds: Unpack[_Kwargs3_g],
711+ ) -> tuple[_ArrayT1, _ArrayT2]: ...
712+
595713@type_check_only
596714class _Call21_g(Protocol):
597- # Scalar for 1D array-likes; ndarray otherwise
715+ # scalar for 1D array-likes; ndarray otherwise
598716 @overload
599717 def __call__(
600718 self,
@@ -604,8 +722,6 @@ class _Call21_g(Protocol):
604722 out: _Out1[_ArrayT],
605723 *,
606724 dtype: None = None,
607- axis: SupportsIndex = ...,
608- axes: Sequence[_Tuple2[SupportsIndex]] = ...,
609725 **kwds: Unpack[_Kwargs3_g],
610726 ) -> _ArrayT: ...
611727 @overload
@@ -617,8 +733,6 @@ class _Call21_g(Protocol):
617733 out: _Out1[_AnyArray | None] = None,
618734 *,
619735 dtype: DTypeLike | None = None,
620- axis: SupportsIndex = ...,
621- axes: Sequence[_Tuple2[SupportsIndex]] = ...,
622736 **kwds: Unpack[_Kwargs3_g],
623737 ) -> Any: ...
624738
@@ -1074,7 +1188,6 @@ _CallT11 = TypeVar("_CallT11", bound=Callable[Concatenate[Any, ...], object], de
10741188_CallT12 = TypeVar("_CallT12", bound=Callable[Concatenate[Any, ...], tuple[object, object]], default=_Call12)
10751189_CallT21 = TypeVar("_CallT21", bound=Callable[Concatenate[Any, Any, ...], object], default=_Call21)
10761190_CallT22 = TypeVar("_CallT22", bound=Callable[Concatenate[Any, Any, ...], tuple[object, object]], default=_Call22)
1077- _CallT21G = TypeVar("_CallT21G", bound=Callable[Concatenate[Any, ...], object], default=_Call21_g)
10781191
10791192_ufunc_1_1 = TypeAliasType(
10801193 "_ufunc_1_1",
@@ -1097,12 +1210,30 @@ _ufunc_2_2 = TypeAliasType(
10971210 type_params=(_CallT22,),
10981211)
10991212
1213+ #
1214+
1215+ _CallT11G = TypeVar("_CallT11G", bound=Callable[Concatenate[Any, ...], object], default=_Call11_g)
1216+ _CallT12G = TypeVar("_CallT12G", bound=Callable[Concatenate[Any, ...], object], default=_Call12_g)
1217+ _CallT21G = TypeVar("_CallT21G", bound=Callable[Concatenate[Any, ...], object], default=_Call21_g)
1218+
1219+ _gufunc_1_1 = TypeAliasType(
1220+ "_gufunc_1_1",
1221+ np.ufunc[_CallT11G, _AtE, _ReduceE, _ReduceAtE, _AccumulateE, _OuterE],
1222+ type_params=(_CallT11G,),
1223+ )
1224+ _gufunc_1_2 = TypeAliasType(
1225+ "_gufunc_1_2",
1226+ np.ufunc[_CallT12G, _AtE, _ReduceE, _ReduceAtE, _AccumulateE, _OuterE],
1227+ type_params=(_CallT12G,),
1228+ )
11001229_gufunc_2_1 = TypeAliasType(
11011230 "_gufunc_2_1",
1102- np.ufunc[_CallT21G, _AtE, _ReduceE, _ReduceAtE, _AccumulateE, _Outer2 ],
1231+ np.ufunc[_CallT21G, _AtE, _ReduceE, _ReduceAtE, _AccumulateE, _Outer1 ],
11031232 type_params=(_CallT21G,),
11041233)
11051234
1235+ #
1236+
11061237_pyfunc_1_1 = TypeAliasType(
11071238 "_pyfunc_1_1",
11081239 np.ufunc[_Call11_py[_OutT], _At1, _ReduceE, _ReduceAtE, _AccumulateE, _OuterE],
0 commit comments