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

Method __getitem__

numpy/lib/tests/test_loadtxt.py:829–832  ·  view source on GitHub ↗
(self, item)

Source from the content-addressed store, hash-verified

827 return 100
828
829 def __getitem__(self, item):
830 if item == 50:
831 raise RuntimeError("Bad things happened!")
832 return f"{item}, {item+1}"
833
834 with pytest.raises(RuntimeError, match="Bad things happened!"):
835 np.loadtxt(BadSequence(), dtype=int, delimiter=",")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected