MCPcopy Create free account
hub / github.com/numpy/numpy / test_oddfeatures_2

Method test_oddfeatures_2

numpy/ma/tests/test_core.py:739–751  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

737 assert_equal(x, z)
738
739 def test_oddfeatures_2(self):
740 # Tests some more features.
741 x = array([1., 2., 3., 4., 5.])
742 c = array([1, 1, 1, 0, 0])
743 x[2] = masked
744 z = where(c, x, -x)
745 assert_equal(z, [1., 2., 0., -4., -5])
746 c[0] = masked
747 z = where(c, x, -x)
748 assert_equal(z, [1., 2., 0., -4., -5])
749 assert_(z[0] is masked)
750 assert_(z[1] is not masked)
751 assert_(z[2] is masked)
752
753 @suppress_copy_mask_on_assignment
754 def test_oddfeatures_3(self):

Callers

nothing calls this directly

Calls 4

arrayFunction · 0.90
whereFunction · 0.90
assert_equalFunction · 0.90
assert_Function · 0.50

Tested by

no test coverage detected