From 75b1639dd5d7828011411b859a14829f8871525f Mon Sep 17 00:00:00 2001 From: TabulateJarl8 Date: Tue, 20 Jul 2021 12:17:06 -0400 Subject: [PATCH] revert decrementing index by one --- ti842py/utils/matrix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ti842py/utils/matrix.py b/ti842py/utils/matrix.py index f0eb8c4..f368915 100644 --- a/ti842py/utils/matrix.py +++ b/ti842py/utils/matrix.py @@ -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