@@ -549,41 +549,41 @@ def __ne__(self, other: int | float | bool | Array, /) -> Array: # type: ignore
549549
550550 # Reflected Arithmetic Operators
551551
552- def __radd__ (self , other : Array , / ) -> Array :
552+ def __radd__ (self , other : int | float | Array , / ) -> Array :
553553 """
554554 Return other + self.
555555 """
556556 return process_c_function (other , self , wrapper .add )
557557
558- def __rsub__ (self , other : Array , / ) -> Array :
558+ def __rsub__ (self , other : int | float | Array , / ) -> Array :
559559 """
560560 Return other - self.
561561 """
562562 return process_c_function (other , self , wrapper .sub )
563563
564- def __rmul__ (self , other : Array , / ) -> Array :
564+ def __rmul__ (self , other : int | float | Array , / ) -> Array :
565565 """
566566 Return other * self.
567567 """
568568 return process_c_function (other , self , wrapper .mul )
569569
570- def __rtruediv__ (self , other : Array , / ) -> Array :
570+ def __rtruediv__ (self , other : int | float | Array , / ) -> Array :
571571 """
572572 Return other / self.
573573 """
574574 return process_c_function (other , self , wrapper .div )
575575
576- def __rfloordiv__ (self , other : Array , / ) -> Array :
576+ def __rfloordiv__ (self , other : int | float | Array , / ) -> Array :
577577 # TODO
578578 return NotImplemented
579579
580- def __rmod__ (self , other : Array , / ) -> Array :
580+ def __rmod__ (self , other : int | float | Array , / ) -> Array :
581581 """
582582 Return other % self.
583583 """
584584 return process_c_function (other , self , wrapper .mod )
585585
586- def __rpow__ (self , other : Array , / ) -> Array :
586+ def __rpow__ (self , other : int | float | Array , / ) -> Array :
587587 """
588588 Return other ** self.
589589 """
@@ -597,31 +597,31 @@ def __rmatmul__(self, other: Array, /) -> Array:
597597
598598 # Reflected Bitwise Operators
599599
600- def __rand__ (self , other : Array , / ) -> Array :
600+ def __rand__ (self , other : int | bool | Array , / ) -> Array :
601601 """
602602 Return other & self.
603603 """
604604 return process_c_function (other , self , wrapper .bitand )
605605
606- def __ror__ (self , other : Array , / ) -> Array :
606+ def __ror__ (self , other : int | bool | Array , / ) -> Array :
607607 """
608608 Return other | self.
609609 """
610610 return process_c_function (other , self , wrapper .bitor )
611611
612- def __rxor__ (self , other : Array , / ) -> Array :
612+ def __rxor__ (self , other : int | bool | Array , / ) -> Array :
613613 """
614614 Return other ^ self.
615615 """
616616 return process_c_function (other , self , wrapper .bitxor )
617617
618- def __rlshift__ (self , other : Array , / ) -> Array :
618+ def __rlshift__ (self , other : int | Array , / ) -> Array :
619619 """
620620 Return other << self.
621621 """
622622 return process_c_function (other , self , wrapper .bitshiftl )
623623
624- def __rrshift__ (self , other : Array , / ) -> Array :
624+ def __rrshift__ (self , other : int | Array , / ) -> Array :
625625 """
626626 Return other >> self.
627627 """
@@ -1126,11 +1126,11 @@ def process_c_function(lhs: int | float | Array, rhs: int | float | Array, c_fun
11261126 lhs_array = lhs .arr
11271127 rhs_array = rhs .arr
11281128
1129- elif isinstance (lhs , Array ) and isinstance (rhs , ( int , float ) ):
1129+ elif isinstance (lhs , Array ) and isinstance (rhs , int | float ):
11301130 lhs_array = lhs .arr
11311131 rhs_array = wrapper .create_constant_array (rhs , lhs .shape , lhs .dtype )
11321132
1133- elif isinstance (lhs , ( int , float ) ) and isinstance (rhs , Array ):
1133+ elif isinstance (lhs , int | float ) and isinstance (rhs , Array ):
11341134 lhs_array = wrapper .create_constant_array (lhs , rhs .shape , rhs .dtype )
11351135 rhs_array = rhs .arr
11361136
0 commit comments