Return array[row][column] where loc = (row, column). Example: >>> a = Matrix(3, 2, 7) >>> a[1, 0] 7
(self, loc: tuple[int, int])
| 73 | return True |
| 74 | |
| 75 | def __getitem__(self, loc: tuple[int, int]) -> Any: |
| 76 | """ |
| 77 | <method Matrix.__getitem__> |
| 78 | Return array[row][column] where loc = (row, column). |
| 79 | Example: |
| 80 | >>> a = Matrix(3, 2, 7) |
| 81 | >>> a[1, 0] |
| 82 | 7 |
| 83 | """ |
| 84 | assert self.validate_indices(loc) |
| 85 | return self.array[loc[0]][loc[1]] |
| 86 | |
| 87 | def __setitem__(self, loc: tuple[int, int], value: float) -> None: |
| 88 | """ |
nothing calls this directly
no test coverage detected