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

Method test_all_zero

numpy/lib/tests/test_function_base.py:1451–1459  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1449 assert_array_equal(res, arr[slc])
1450
1451 def test_all_zero(self):
1452 for _arr in self.values():
1453 arr = np.zeros_like(_arr, dtype=_arr.dtype)
1454
1455 res1 = trim_zeros(arr, trim='B')
1456 assert len(res1) == 0
1457
1458 res2 = trim_zeros(arr, trim='f')
1459 assert len(res2) == 0
1460
1461 def test_size_zero(self):
1462 arr = np.zeros(0)

Callers

nothing calls this directly

Calls 3

valuesMethod · 0.95
trim_zerosFunction · 0.90
zeros_likeMethod · 0.80

Tested by

no test coverage detected