예제 #1
0
 def test_masked_binary_operations(self):
     # Tests masked_binary_operation
     (x, mx) = self.data
     # Result should be a mmatrix
     self.assertTrue(isinstance(add(mx, mx), mmatrix))
     self.assertTrue(isinstance(add(mx, x), mmatrix))
     # Result should work
     assert_equal(add(mx, x), mx+x)
     self.assertTrue(isinstance(add(mx, mx)._data, np.matrix))
     self.assertTrue(isinstance(add.outer(mx, mx), mmatrix))
     self.assertTrue(isinstance(hypot(mx, mx), mmatrix))
     self.assertTrue(isinstance(hypot(mx, x), mmatrix))
예제 #2
0
 def test_masked_binary_operations(self):
     # TestData masked_binary_operation
     (x, mx) = self.data
     # Result should be a msubarray
     assert_(isinstance(add(mx, mx), msubarray))
     assert_(isinstance(add(mx, x), msubarray))
     # Result should work
     assert_equal(add(mx, x), mx+x)
     assert_(isinstance(add(mx, mx)._data, subarray))
     assert_(isinstance(add.outer(mx, mx), msubarray))
     assert_(isinstance(hypot(mx, mx), msubarray))
     assert_(isinstance(hypot(mx, x), msubarray))
예제 #3
0
 def test_masked_binary_operations(self):
     # Tests masked_binary_operation
     (x, mx) = self.data
     # Result should be a MMatrix
     assert_(isinstance(add(mx, mx), MMatrix))
     assert_(isinstance(add(mx, x), MMatrix))
     # Result should work
     assert_equal(add(mx, x), mx+x)
     assert_(isinstance(add(mx, mx)._data, np.matrix))
     assert_(isinstance(add.outer(mx, mx), MMatrix))
     assert_(isinstance(hypot(mx, mx), MMatrix))
     assert_(isinstance(hypot(mx, x), MMatrix))
예제 #4
0
 def test_masked_binary_operations(self):
     # Tests masked_binary_operation
     (x, mx) = self.data
     # Result should be a msubarray
     assert_(isinstance(add(mx, mx), msubarray))
     assert_(isinstance(add(mx, x), msubarray))
     # Result should work
     assert_equal(add(mx, x), mx+x)
     assert_(isinstance(add(mx, mx)._data, subarray))
     assert_(isinstance(add.outer(mx, mx), msubarray))
     assert_(isinstance(hypot(mx, mx), msubarray))
     assert_(isinstance(hypot(mx, x), msubarray))