parameters: (self, a, *args, **kwargs)
return_statement: return masked_result
docstring: Execute the call behavior.
docstring_summary: Execute the call behavior.
docstring_tokens: Execute the call behavior .
function: def __call__(self, a, *args, **kwargs):
          """
          Execute the call behavior.
  
          """
          d = getdata(a)
          # Deal with domain
          if self.domain is not None:
              # Case 1.1. : Domained function
              # nans at masked positions cause RuntimeWarnings, even though
              # they are masked. To avoid this we suppress warnings.
              with np.errstate(divide='ignore', invalid='ignore'):
                  result = self.f(d, *args, **kwargs)
              # Make a mask
              m = ~umath.isfinite(result)
              m |= self.domain(d)
              m |= getmask(a)
          else:
              # Case 1.2. : Function without a domain
              # Get the result and the mask
              with np.errstate(divide='ignore', invalid='ignore'):
                  result = self.f(d, *args, **kwargs)
              m = getmask(a)
  
          if not result.ndim:
              # Case 2.1. : The result is scalarscalar
              if m:
                  return masked
              return result
  
          if m is not nomask:
              # Case 2.2. The result is an array
              # We need to fill the invalid data back w/ the input Now,
              # that's plain silly: in C, we would just skip the element and
              # keep the original, but we do have to do it that way in Python
  
              # In case result has a lower dtype than the inputs (as in
              # equal)
              try:
                  np.copyto(result, d, where=m)
              except TypeError:
                  pass
          # Transform to
          masked_result = result.view(get_masked_subclass(a))
          masked_result._mask = m
          masked_result._update_from(a)
          return masked_result
function_tokens: def __call__ ( self , a , * args , * * kwargs ) : d = getdata ( a ) # Deal with domain if self . domain is not None : # Case 1.1. : Domained function # nans at masked positions cause RuntimeWarnings, even though # they are masked. To avoid this we suppress warnings. with np . errstate ( divide = 'ignore' , invalid = 'ignore' ) : result = self . f ( d , * args , * * kwargs ) # Make a mask m = ~ umath . isfinite ( result ) m |= self . domain ( d ) m |= getmask ( a ) else : # Case 1.2. : Function without a domain # Get the result and the mask with np . errstate ( divide = 'ignore' , invalid = 'ignore' ) : result = self . f ( d , * args , * * kwargs ) m = getmask ( a ) if not result . ndim : # Case 2.1. : The result is scalarscalar if m : return masked return result if m is not nomask : # Case 2.2. The result is an array # We need to fill the invalid data back w/ the input Now, # that's plain silly: in C, we would just skip the element and # keep the original, but we do have to do it that way in Python # In case result has a lower dtype than the inputs (as in # equal) try : np . copyto ( result , d , where = m ) except TypeError : pass # Transform to masked_result = result . view ( get_masked_subclass ( a ) ) masked_result . _mask = m masked_result . _update_from ( a ) return masked_result