parameters: (self)
docstring: Tests ufunc
docstring_summary: Tests ufunc
docstring_tokens: Tests ufunc
function: def test_7(self):
          "Tests ufunc"
          d = (self.array([1.0, 0, -1, pi/2]*2, mask=[0, 1]+[0]*6),
               self.array([1.0, 0, -1, pi/2]*2, mask=[1, 0]+[0]*6),)
          for f in ['sqrt', 'log', 'log10', 'exp', 'conjugate',
  #                  'sin', 'cos', 'tan',
  #                  'arcsin', 'arccos', 'arctan',
  #                  'sinh', 'cosh', 'tanh',
  #                  'arcsinh',
  #                  'arccosh',
  #                  'arctanh',
  #                  'absolute', 'fabs', 'negative',
  #                  # 'nonzero', 'around',
  #                  'floor', 'ceil',
  #                  # 'sometrue', 'alltrue',
  #                  'logical_not',
  #                  'add', 'subtract', 'multiply',
  #                  'divide', 'true_divide', 'floor_divide',
  #                  'remainder', 'fmod', 'hypot', 'arctan2',
  #                  'equal', 'not_equal', 'less_equal', 'greater_equal',
  #                  'less', 'greater',
  #                  'logical_and', 'logical_or', 'logical_xor',
                    ]:
              try:
                  uf = getattr(self.umath, f)
              except AttributeError:
                  uf = getattr(fromnumeric, f)
              mf = getattr(self.module, f)
              args = d[:uf.nin]
              ur = uf(*args)
              mr = mf(*args)
              self.assert_array_equal(ur.filled(0), mr.filled(0), f)
              self.assert_array_equal(ur._mask, mr._mask)
function_tokens: def test_7 ( self ) : d = ( self . array ( [ 1.0 , 0 , - 1 , pi / 2 ] * 2 , mask = [ 0 , 1 ] + [ 0 ] * 6 ) , self . array ( [ 1.0 , 0 , - 1 , pi / 2 ] * 2 , mask = [ 1 , 0 ] + [ 0 ] * 6 ) , ) for f in [ 'sqrt' , 'log' , 'log10' , 'exp' , 'conjugate' , #                  'sin', 'cos', 'tan', #                  'arcsin', 'arccos', 'arctan', #                  'sinh', 'cosh', 'tanh', #                  'arcsinh', #                  'arccosh', #                  'arctanh', #                  'absolute', 'fabs', 'negative', #                  # 'nonzero', 'around', #                  'floor', 'ceil', #                  # 'sometrue', 'alltrue', #                  'logical_not', #                  'add', 'subtract', 'multiply', #                  'divide', 'true_divide', 'floor_divide', #                  'remainder', 'fmod', 'hypot', 'arctan2', #                  'equal', 'not_equal', 'less_equal', 'greater_equal', #                  'less', 'greater', #                  'logical_and', 'logical_or', 'logical_xor', ] : try : uf = getattr ( self . umath , f ) except AttributeError : uf = getattr ( fromnumeric , f ) mf = getattr ( self . module , f ) args = d [ : uf . nin ] ur = uf ( * args ) mr = mf ( * args ) self . assert_array_equal ( ur . filled ( 0 ) , mr . filled ( 0 ) , f ) self . assert_array_equal ( ur . _mask , mr . _mask )