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

Method test_all_zero

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

Source from the content-addressed store, hash-verified

1281 assert_array_equal(res, arr[slc])
1282
1283 def test_all_zero(self):
1284 for _arr in self.values():
1285 arr = np.zeros_like(_arr, dtype=_arr.dtype)
1286
1287 res1 = trim_zeros(arr, trim='B')
1288 assert len(res1) == 0
1289
1290 res2 = trim_zeros(arr, trim='f')
1291 assert len(res2) == 0
1292
1293 def test_size_zero(self):
1294 arr = np.zeros(0)

Callers

nothing calls this directly

Calls 2

valuesMethod · 0.95
trim_zerosFunction · 0.90

Tested by

no test coverage detected