parameters: (self, a, *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, *args, **kwargs):
          "Execute the call behavior."
          d = getdata(a)
          # Case 1.1. : Domained function
          if self.domain is not None:
              with np.errstate():
                  np.seterr(divide='ignore', invalid='ignore')
                  result = self.f(d, *args, **kwargs)
              # Make a mask
              m = ~umath.isfinite(result)
              m |= self.domain(d)
              m |= getmask(a)
          # Case 1.2. : Function without a domain
          else:
              # Get the result and the mask
              result = self.f(d, *args, **kwargs)
              m = getmask(a)
          # Case 2.1. : The result is scalarscalar
          if not result.ndim:
              if m:
                  return masked
              return result
          # 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
          if m is not nomask:
              # 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
          if isinstance(a, MaskedArray):
              subtype = type(a)
          else:
              subtype = MaskedArray
          result = result.view(subtype)
          result._mask = m
          result._update_from(a)
          return result
function_tokens: def __call__ ( self , a , * args , * * kwargs ) : d = getdata ( a ) # Case 1.1. : Domained function if self . domain is not None : with np . errstate ( ) : np . seterr ( divide = 'ignore' , invalid = 'ignore' ) result = self . f ( d , * args , * * kwargs ) # Make a mask m = ~ umath . isfinite ( result ) m |= self . domain ( d ) m |= getmask ( a ) # Case 1.2. : Function without a domain else : # Get the result and the mask result = self . f ( d , * args , * * kwargs ) m = getmask ( a ) # Case 2.1. : The result is scalarscalar if not result . ndim : if m : return masked return result # 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 if m is not nomask : # 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 if isinstance ( a , MaskedArray ) : subtype = type ( a ) else : subtype = MaskedArray result = result . view ( subtype ) result . _mask = m result . _update_from ( a ) return result