returns a string representation of this matrix.
(self)
| 271 | self.__height = h |
| 272 | |
| 273 | def __str__(self) -> str: |
| 274 | """ |
| 275 | returns a string representation of this matrix. |
| 276 | """ |
| 277 | ans = "" |
| 278 | for i in range(self.__height): |
| 279 | ans += "|" |
| 280 | for j in range(self.__width): |
| 281 | if j < self.__width - 1: |
| 282 | ans += str(self.__matrix[i][j]) + "," |
| 283 | else: |
| 284 | ans += str(self.__matrix[i][j]) + "|\n" |
| 285 | return ans |
| 286 | |
| 287 | def __add__(self, other: Matrix) -> Matrix: |
| 288 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected