parameters: (self, target, axis=0, dtype=None)
docstring: Reduce target along the given axis with this function.
docstring_summary: Reduce target along the given axis with this function.
docstring_tokens: Reduce target along the given axis with this function .
function: def reduce (self, target, axis=0, dtype=None):
          """Reduce target along the given axis with this function."""
          m = getmask(target)
          t = filled(target, self.filly)
          if t.shape == ():
              t = t.reshape(1)
              if m is not nomask:
                  m = make_mask(m, copy=1)
                  m.shape = (1,)
          if m is nomask:
              t = self.f.reduce(t, axis)
          else:
              t = masked_array (t, m)
              # XXX: "or t.dtype" below is a workaround for what appears
              # XXX: to be a bug in reduce.
              t = self.f.reduce(filled(t, self.filly), axis,
                                dtype=dtype or t.dtype)
              m = umath.logical_and.reduce(m, axis)
          if isinstance(t, ndarray):
              return masked_array(t, m, get_fill_value(target))
          elif m:
              return masked
          else:
              return t
function_tokens: def reduce ( self , target , axis = 0 , dtype = None ) : m = getmask ( target ) t = filled ( target , self . filly ) if t . shape == ( ) : t = t . reshape ( 1 ) if m is not nomask : m = make_mask ( m , copy = 1 ) m . shape = ( 1 , ) if m is nomask : t = self . f . reduce ( t , axis ) else : t = masked_array ( t , m ) # XXX: "or t.dtype" below is a workaround for what appears # XXX: to be a bug in reduce. t = self . f . reduce ( filled ( t , self . filly ) , axis , dtype = dtype or t . dtype ) m = umath . logical_and . reduce ( m , axis ) if isinstance ( t , ndarray ) : return masked_array ( t , m , get_fill_value ( target ) ) elif m : return masked else : return t