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

Method test_clump_masked

numpy/ma/tests/test_extras.py:126–135  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

124 assert_equal(a.compressed().sum(), s)
125
126 def test_clump_masked(self):
127 # Test clump_masked
128 a = masked_array(np.arange(10))
129 a[[0, 1, 2, 6, 8, 9]] = masked
130 #
131 test = clump_masked(a)
132 control = [slice(0, 3), slice(6, 7), slice(8, 10)]
133 assert_equal(test, control)
134
135 self.check_clump(clump_masked)
136
137 def test_clump_unmasked(self):
138 # Test clump_unmasked

Callers

nothing calls this directly

Calls 3

check_clumpMethod · 0.95
clump_maskedFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected