@@ -400,6 +400,25 @@ def __imod__(self, other: Self | int | float, /) -> Self:
400400 ...
401401
402402
403+ class CanArrayRMod (Protocol ):
404+ """Protocol for array classes that support the right modulo operator."""
405+ 406+ def __rmod__ (self , other : Self | int | float , / ) -> Self :
407+ """Calculates the remainder for each element of the array `other` with the respective element of an array instance.
408+
409+ Args:
410+ other: dividend array. Must be compatible with `self` (see Broadcasting). Should have a numeric data type.
411+
412+ Returns:
413+ Self: an array containing the element-wise remainders. The returned array must have a data type determined by Type Promotion Rules.
414+
415+ See Also:
416+ array_api_typing.Remainder
417+
418+ """ # noqa: E501
419+ ...
420+ 421+ 403422class CanArrayPow (Protocol ):
404423 """Protocol for array classes that support the power operator."""
405424
@@ -474,6 +493,7 @@ class Array(
474493 CanArrayRFloorDiv ,
475494 CanArrayMod ,
476495 CanArrayIMod ,
496+ CanArrayRMod ,
477497 CanArrayPow ,
478498 CanArrayIPow ,
479499 CanArrayRPow ,
0 commit comments