Skip to content

Commit

Permalink
remove redundant __getitem__
Browse files Browse the repository at this point in the history
  • Loading branch information
AnirudhDagar committed Sep 20, 2019
1 parent 746aaef commit 854b6be
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions scipy/sparse/lil.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,16 +225,6 @@ def _asindices(self, idx, N):
raise IndexError('Index dimension must be <= 2')
return x

def __getitem__(self, key):
# Fast path for simple (int, int) indexing.
if (isinstance(key, tuple) and len(key) == 2 and
isinstance(key[0], INT_TYPES) and
isinstance(key[1], INT_TYPES)):
# lil_get1 handles validation for us.
return self._get_intXint(*key)
# Everything else takes the normal path.
return IndexMixin.__getitem__(self, key)

def _get_intXint(self, row, col):
v = _csparsetools.lil_get1(self.shape[0], self.shape[1], self.rows,
self.data, row, col)
Expand Down

0 comments on commit 854b6be

Please sign in to comment.