Given a class like this:
class X(int):
def __add__(self, other):
return 42
def __radd__(self, other):
return 24
__array_priority__ = 20
Adding to a numpy array works as expected:
However, when I add X() to a masked array, X.__radd__ is not called:
>>> np.ma.array(2) + X()
2