parameters: (self)
docstring: Test of take, transpose, inner, outer products
docstring_summary: Test of take, transpose, inner, outer products
docstring_tokens: Test of take transpose inner outer products
function: def test_4(self):
          "Test of take, transpose, inner, outer products"
          x = self.arange(24)
          y = np.arange(24)
          x[5:6] = self.masked
          x = x.reshape(2, 3, 4)
          y = y.reshape(2, 3, 4)
          assert self.allequal(np.transpose(y, (2, 0, 1)), self.transpose(x, (2, 0, 1)))
          assert self.allequal(np.take(y, (2, 0, 1), 1), self.take(x, (2, 0, 1), 1))
          assert self.allequal(np.inner(self.filled(x, 0), self.filled(y, 0)),
                              self.inner(x, y))
          assert self.allequal(np.outer(self.filled(x, 0), self.filled(y, 0)),
                              self.outer(x, y))
          y = self.array(['abc', 1, 'def', 2, 3], object)
          y[2] = self.masked
          t = self.take(y, [0, 3, 4])
          assert t[0] == 'abc'
          assert t[1] == 2
          assert t[2] == 3
function_tokens: def test_4 ( self ) : x = self . arange ( 24 ) y = np . arange ( 24 ) x [ 5 : 6 ] = self . masked x = x . reshape ( 2 , 3 , 4 ) y = y . reshape ( 2 , 3 , 4 ) assert self . allequal ( np . transpose ( y , ( 2 , 0 , 1 ) ) , self . transpose ( x , ( 2 , 0 , 1 ) ) ) assert self . allequal ( np . take ( y , ( 2 , 0 , 1 ) , 1 ) , self . take ( x , ( 2 , 0 , 1 ) , 1 ) ) assert self . allequal ( np . inner ( self . filled ( x , 0 ) , self . filled ( y , 0 ) ) , self . inner ( x , y ) ) assert self . allequal ( np . outer ( self . filled ( x , 0 ) , self . filled ( y , 0 ) ) , self . outer ( x , y ) ) y = self . array ( [ 'abc' , 1 , 'def' , 2 , 3 ] , object ) y [ 2 ] = self . masked t = self . take ( y , [ 0 , 3 , 4 ] ) assert t [ 0 ] == 'abc' assert t [ 1 ] == 2 assert t [ 2 ] == 3