tabulate und ruff als Abhängigkeiten, Matrixausgabe in compute.py

This commit is contained in:
bhullarra105880 committed 2026-10-15 13:44:39 +02:00
1 parent 6a487075df
commit e1b58f1c88
2 files changed
+5 -4

No files matched your search

+3 -3
View File
@@ -1,11 +1,11 @@
"""Utility functions for matrix operations."""
from __future__ import annotations
import math
Matrix = list[list[int | float]]
from tabulate import tabulate
Matrix = list[list[int | float]]
def transpose(matrix: Matrix) -> Matrix:
"""Return the transpose of a matrix.
@@ -113,5 +113,5 @@ if __name__ == "__main__":
assert math.isclose(rotated[0][0], 0.0, abs_tol=1e-9)
assert math.isclose(rotated[1][0], 1.0, abs_tol=1e-9)
assert rot_2D(0) == [[1.0, 0.0], [0.0, 1.0]]
print(tabulate(rot_2D(1.0)))
print("Alle Tests bestanden.")
+2 -1
View File
@@ -1,3 +1,4 @@
[project]
name = "matrixmania"
version = "0.1.0"
version = "0.1.0"
dependencies = ["tabulate", "ruff"]