pyproject.toml und compute.py mit tabulate und ruff aktualisiert

This commit is contained in:
ecksteinle104079 committed 2026-10-27 19:12:08 +01:00
1 parent 92e8625650
commit 51f39a6402
2 files changed
+7 -2

No files matched your search

+6 -2
View File
@@ -1,5 +1,7 @@
from typing import TypeAlias
from math import cos, sin from math import cos, sin
from typing import TypeAlias
from tabulate import tabulate
Number: TypeAlias = int | float Number: TypeAlias = int | float
Matrix: TypeAlias = list[list[Number]] Matrix: TypeAlias = list[list[Number]]
@@ -153,9 +155,11 @@ if __name__ == "__main__":
assert matrix == expected assert matrix == expected
print("Rotation erfolgreich:", matrix) print("Rotation erfolgreich:", matrix)
# Beispiel Transponierung ghfghgf # Beispiel Transponierung
matrix = [[1, 2, 3], [4, 5, 6]] matrix = [[1, 2, 3], [4, 5, 6]]
expected = [[1, 4], [2, 5], [3, 6]] expected = [[1, 4], [2, 5], [3, 6]]
assert transpose(matrix) == expected assert transpose(matrix) == expected
print("Transponierung erfolgreich:", transpose(matrix)) print("Transponierung erfolgreich:", transpose(matrix))
print(tabulate(rot_2D(1.0)))
+1
View File
@@ -1,3 +1,4 @@
[project] [project]
name = "matrixmania" name = "matrixmania"
version = "0.1.0" version = "0.1.0"
dependencies = ["tabulate", "ruff"]