Skip to content

Commit

Permalink
revert decrementing index by one
Browse files Browse the repository at this point in the history
  • Loading branch information
TabulateJarl8 committed Jul 20, 2021
1 parent c0540d1 commit 75b1639
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ti842py/utils/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,9 @@ def __getitem__(self, index):
# We do not need __setitem__ because the user should not be messing
# with the parent lists directly. __getitem__ is enough to interface
# with the child lists contained within self.matrix
return self.matrix[index - 1] # indexes start at 1 in TI-BASIC
return self.matrix[index] # indexes start at 1 in TI-BASIC

def __call__(self, row, col):
# TI-BASIC matrices are accessed like [A](1, 2), so I've implemented
# that here. Uses __getitem__
return self.__getitem__(row - 1)[col - 1] # indexes start at 1 in TI-BASIC
return self.__getitem__(row)[col] # indexes start at 1 in TI-BASIC

0 comments on commit 75b1639

Please sign in to comment.