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

Method test_count_nonzero

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

Source from the content-addressed store, hash-verified

1680 assert_equal(np.count_nonzero(a), c)
1681
1682 def test_count_nonzero(self):
1683 # check all 12 bit combinations in a length 17 array
1684 # covers most cases of the 16 byte unrolled code
1685 self.check_count_nonzero(12, 17)
1686
1687 @pytest.mark.slow
1688 def test_count_nonzero_all(self):

Callers

nothing calls this directly

Calls 1

check_count_nonzeroMethod · 0.95

Tested by

no test coverage detected