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

Method test_compress

numpy/core/tests/test_numeric.py:101–106  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

99 assert_equal(out, tgt)
100
101 def test_compress(self):
102 arr = [[0, 1, 2, 3, 4],
103 [5, 6, 7, 8, 9]]
104 tgt = [[5, 6, 7, 8, 9]]
105 out = np.compress([0, 1], arr, axis=0)
106 assert_equal(out, tgt)
107
108 def test_count_nonzero(self):
109 arr = [[0, 1, 7, 0, 0],

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
compressMethod · 0.80

Tested by

no test coverage detected