(self, rows: list[list[int]])
| 108 | """ |
| 109 | |
| 110 | def __init__(self, rows: list[list[int]]): |
| 111 | error = TypeError( |
| 112 | "Matrices must be formed from a list of zero or more lists containing at " |
| 113 | "least one and the same number of values, each of which must be of type " |
| 114 | "int or float." |
| 115 | ) |
| 116 | if len(rows) != 0: |
| 117 | cols = len(rows[0]) |
| 118 | if cols == 0: |
| 119 | raise error |
| 120 | for row in rows: |
| 121 | if len(row) != cols: |
| 122 | raise error |
| 123 | for value in row: |
| 124 | if not isinstance(value, (int, float)): |
| 125 | raise error |
| 126 | self.rows = rows |
| 127 | else: |
| 128 | self.rows = [] |
| 129 | |
| 130 | # MATRIX INFORMATION |
| 131 | def columns(self) -> list[list[int]]: |
nothing calls this directly
no outgoing calls
no test coverage detected