parameters: (self, a, b, *args, **kwargs)
return_statement: return result
docstring: Execute the call behavior.
docstring_summary: Execute the call behavior.
docstring_tokens: Execute the call behavior .
function: def __call__(self, a, b, *args, **kwargs):
          "Execute the call behavior."
          # Get the data and the mask
          (da, db) = (getdata(a, subok=False), getdata(b, subok=False))
          (ma, mb) = (getmask(a), getmask(b))
          # Get the result
          with np.errstate():
              np.seterr(divide='ignore', invalid='ignore')
              result = self.f(da, db, *args, **kwargs)
          # check it worked
          if result is NotImplemented:
              return NotImplemented
          # Get the mask as a combination of ma, mb and invalid
          m = ~umath.isfinite(result)
          m |= ma
          m |= mb
          # Apply the domain
          domain = ufunc_domain.get(self.f, None)
          if domain is not None:
              m |= filled(domain(da, db), True)
          # Take care of the scalar case first
          if (not m.ndim):
              if m:
                  return masked
              else:
                  return result
          # When the mask is True, put back da
          np.copyto(result, 0, casting='unsafe', where=m)
          result += m * da
          result = result.view(get_masked_subclass(a, b))
          result._mask = m
          if isinstance(b, MaskedArray):
              if isinstance(a, MaskedArray):
                  result._update_from(a)
              else:
                  result._update_from(b)
          elif isinstance(a, MaskedArray):
              result._update_from(a)
          return result
function_tokens: def __call__ ( self , a , b , * args , * * kwargs ) : # Get the data and the mask ( da , db ) = ( getdata ( a , subok = False ) , getdata ( b , subok = False ) ) ( ma , mb ) = ( getmask ( a ) , getmask ( b ) ) # Get the result with np . errstate ( ) : np . seterr ( divide = 'ignore' , invalid = 'ignore' ) result = self . f ( da , db , * args , * * kwargs ) # check it worked if result is NotImplemented : return NotImplemented # Get the mask as a combination of ma, mb and invalid m = ~ umath . isfinite ( result ) m |= ma m |= mb # Apply the domain domain = ufunc_domain . get ( self . f , None ) if domain is not None : m |= filled ( domain ( da , db ) , True ) # Take care of the scalar case first if ( not m . ndim ) : if m : return masked else : return result # When the mask is True, put back da np . copyto ( result , 0 , casting = 'unsafe' , where = m ) result += m * da result = result . view ( get_masked_subclass ( a , b ) ) result . _mask = m if isinstance ( b , MaskedArray ) : if isinstance ( a , MaskedArray ) : result . _update_from ( a ) else : result . _update_from ( b ) elif isinstance ( a , MaskedArray ) : result . _update_from ( a ) return result