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

Method test_methods

numpy/core/tests/test_indexerrors.py:125–133  ·  view source on GitHub ↗

cases from methods.c

(self)

Source from the content-addressed store, hash-verified

123 lambda: a[index])
124
125 def test_methods(self):
126 "cases from methods.c"
127
128 a = np.zeros((3, 3))
129 assert_raises(IndexError, lambda: a.item(100))
130 assert_raises(IndexError, lambda: a.itemset(100, 1))
131 a = np.zeros((0, 3))
132 assert_raises(IndexError, lambda: a.item(100))
133 assert_raises(IndexError, lambda: a.itemset(100, 1))

Callers

nothing calls this directly

Calls 2

assert_raisesFunction · 0.90
itemMethod · 0.80

Tested by

no test coverage detected