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

Method test_allzero

numpy/lib/tests/test_function_base.py:1494–1497  ·  view source on GitHub ↗
(self, ndim)

Source from the content-addressed store, hash-verified

1492
1493 @pytest.mark.parametrize("ndim", (0, 1, 2, 3))
1494 def test_allzero(self, ndim):
1495 a = np.zeros((3,) * ndim)
1496 res = trim_zeros(a, axis=None)
1497 assert_array_equal(res, np.zeros((0,) * ndim))
1498
1499 def test_trim_arg(self):
1500 a = np.array([0, 1, 2, 0])

Callers

nothing calls this directly

Calls 2

trim_zerosFunction · 0.90
assert_array_equalFunction · 0.90

Tested by

no test coverage detected