diff --git a/ pyproject.toml b/ pyproject.toml index 46e3b47..3a776b1 100644 --- a/ pyproject.toml +++ b/ pyproject.toml @@ -1,3 +1,4 @@ [project] name = "matrixmania" -version = "0.1.0" \ No newline at end of file +version = "0.1.0" +dependencies = ["tabulate", "ruff"] \ No newline at end of file diff --git a/compute.py b/compute.py index d9c03a2..2757397 100644 --- a/compute.py +++ b/compute.py @@ -10,10 +10,12 @@ Functions: """ from __future__ import annotations -from typing import List + import math -Matrix = List[List[float]] +from tabulate import tabulate + +Matrix = list[list[float]] def transpose(matrix: Matrix) -> Matrix: """Return the transpose of *matrix*. @@ -108,7 +110,7 @@ def matmul(A: Matrix, B: Matrix) -> Matrix: result: Matrix = [] for i in range(a_rows): - row: List[float] = [] + row: list[float] = [] for j in range(b_cols): s = 0.0 for k in range(a_cols): @@ -129,4 +131,6 @@ if __name__ == "__main__": rotated_point = matmul(R, point) print("Gedrehter Punkt (erwartet y=1, x=0):", rotated_point) + print(tabulate(rot_2D(1.0))) + #Dieser Kommentar ist ein Test \ No newline at end of file