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

Method test_nd_basic

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

Source from the content-addressed store, hash-verified

1485
1486 @pytest.mark.parametrize("ndim", (0, 1, 2, 3, 10))
1487 def test_nd_basic(self, ndim):
1488 a = np.ones((2,) * ndim)
1489 b = np.pad(a, (2, 1), mode="constant", constant_values=0)
1490 res = trim_zeros(b, axis=None)
1491 assert_array_equal(a, res)
1492
1493 @pytest.mark.parametrize("ndim", (0, 1, 2, 3))
1494 def test_allzero(self, ndim):

Callers

nothing calls this directly

Calls 2

trim_zerosFunction · 0.90
assert_array_equalFunction · 0.90

Tested by

no test coverage detected