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

Method test_truncate

numpy/core/tests/test_multiarray.py:5047–5051  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5045 assert_equal(out, tgt)
5046
5047 def test_truncate(self):
5048 tgt = [[1], [6]]
5049 arr = np.arange(10).reshape(2, 5)
5050 out = np.compress([0, 1], arr, axis=1)
5051 assert_equal(out, tgt)
5052
5053 def test_flatten(self):
5054 arr = np.arange(10).reshape(2, 5)

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
reshapeMethod · 0.80
compressMethod · 0.80

Tested by

no test coverage detected