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

Method load_data

numpy/core/tests/test_numeric.py:1213–1219  ·  view source on GitHub ↗
(self, n, eindex)

Source from the content-addressed store, hash-verified

1211 assert_(np.all(a20 == expected[:20], axis=0))
1212
1213 def load_data(self, n, eindex):
1214 # Utility method for the issue 2592 tests.
1215 # Raise an exception at the desired index in the iterator.
1216 for e in range(n):
1217 if e == eindex:
1218 raise NIterError('error at index %s' % eindex)
1219 yield e
1220
1221 @pytest.mark.parametrize("dtype", [int, object])
1222 @pytest.mark.parametrize(["count", "error_index"], [(10, 5), (10, 9)])

Callers 1

test_2592Method · 0.95

Calls 1

NIterErrorClass · 0.85

Tested by

no test coverage detected