MCPcopy Index your code
hub / github.com/numpy/numpy / test_oddfeatures_2

Method test_oddfeatures_2

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

Source from the content-addressed store, hash-verified

832 assert_equal(x, z)
833
834 def test_oddfeatures_2(self):
835 # Tests some more features.
836 x = array([1., 2., 3., 4., 5.])
837 c = array([1, 1, 1, 0, 0])
838 x[2] = masked
839 z = where(c, x, -x)
840 assert_equal(z, [1., 2., 0., -4., -5])
841 c[0] = masked
842 z = where(c, x, -x)
843 assert_equal(z, [1., 2., 0., -4., -5])
844 assert_(z[0] is masked)
845 assert_(z[1] is not masked)
846 assert_(z[2] is masked)
847
848 def test_oddfeatures_3(self):
849 msg = "setting an item on a masked array which has a shared mask will not copy"

Callers

nothing calls this directly

Calls 4

arrayFunction · 0.90
whereFunction · 0.90
assert_equalFunction · 0.90
assert_Function · 0.85

Tested by

no test coverage detected