parameters: (self)
docstring: Tests creation
docstring_summary: Tests creation
docstring_tokens: Tests creation
function: def test_1(self):
          """
          Tests creation
  
          """
          x = np.array([1., 1., 1., -2., pi/2.0, 4., 5., -10., 10., 1., 2., 3.])
          y = np.array([5., 0., 3., 2., -1., -4., 0., -10., 10., 1., 0., 3.])
          m1 = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
          m2 = [0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1]
          xm = self.masked_array(x, mask=m1)
          ym = self.masked_array(y, mask=m2)
          xf = np.where(m1, 1.e+20, x)
          xm.set_fill_value(1.e+20)
  
          assert((xm-ym).filled(0).any())
          s = x.shape
          assert(xm.size == reduce(lambda x, y:x*y, s))
          assert(self.count(xm) == len(m1) - reduce(lambda x, y:x+y, m1))
  
          for s in [(4, 3), (6, 2)]:
              x.shape = s
              y.shape = s
              xm.shape = s
              ym.shape = s
              xf.shape = s
              assert(self.count(xm) == len(m1) - reduce(lambda x, y:x+y, m1))
function_tokens: def test_1 ( self ) : x = np . array ( [ 1. , 1. , 1. , - 2. , pi / 2.0 , 4. , 5. , - 10. , 10. , 1. , 2. , 3. ] ) y = np . array ( [ 5. , 0. , 3. , 2. , - 1. , - 4. , 0. , - 10. , 10. , 1. , 0. , 3. ] ) m1 = [ 1 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 ] m2 = [ 0 , 0 , 1 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 1 ] xm = self . masked_array ( x , mask = m1 ) ym = self . masked_array ( y , mask = m2 ) xf = np . where ( m1 , 1.e+20 , x ) xm . set_fill_value ( 1.e+20 ) assert ( ( xm - ym ) . filled ( 0 ) . any ( ) ) s = x . shape assert ( xm . size == reduce ( lambda x , y : x * y , s ) ) assert ( self . count ( xm ) == len ( m1 ) - reduce ( lambda x , y : x + y , m1 ) ) for s in [ ( 4 , 3 ) , ( 6 , 2 ) ] : x . shape = s y . shape = s xm . shape = s ym . shape = s xf . shape = s assert ( self . count ( xm ) == len ( m1 ) - reduce ( lambda x , y : x + y , m1 ) )