parameters: (self, target, axis=0, dtype=None)
return_statement: return masked_tr
docstring: Reduce `target` along the given `axis`.
docstring_summary: Reduce `target` along the given `axis`.
docstring_tokens: Reduce target along the given axis .
function: def reduce(self, target, axis=0, dtype=None):
          """
          Reduce `target` along the given `axis`.
  
          """
          tclass = get_masked_subclass(target)
          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=True)
                  m.shape = (1,)
  
          if m is nomask:
              tr = self.f.reduce(t, axis)
              mr = nomask
          else:
              tr = self.f.reduce(t, axis, dtype=dtype or t.dtype)
              mr = umath.logical_and.reduce(m, axis)
  
          if not tr.shape:
              if mr:
                  return masked
              else:
                  return tr
          masked_tr = tr.view(tclass)
          masked_tr._mask = mr
          return masked_tr
function_tokens: def reduce ( self , target , axis = 0 , dtype = None ) : tclass = get_masked_subclass ( target ) 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 = True ) m . shape = ( 1 , ) if m is nomask : tr = self . f . reduce ( t , axis ) mr = nomask else : tr = self . f . reduce ( t , axis , dtype = dtype or t . dtype ) mr = umath . logical_and . reduce ( m , axis ) if not tr . shape : if mr : return masked else : return tr masked_tr = tr . view ( tclass ) masked_tr . _mask = mr return masked_tr