Tabulate und Ruff eingefügt, Ruff Check durchgeführt

This commit is contained in:
MaaaartinTH committed 2026-10-15 13:38:28 +02:00
1 parent ee696cfa98
commit 090453d4aa
2 files changed
+7 -3

No files matched your search

+6 -3
View File
@@ -12,10 +12,12 @@ Functions:
# Teständerung
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*.
@@ -110,7 +112,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):
@@ -130,3 +132,4 @@ if __name__ == "__main__":
point = [[1.0], [0.0]] # Punkt auf der x-Achse bei x=1, y=0
rotated_point = matmul(R, point)
print("Gedrehter Punkt (erwartet y=1, x=0):", rotated_point)
print(tabulate(rot_2D(1.0)))
+1
View File
@@ -1,3 +1,4 @@
[project]
name = "matrixmania"
version = "0.1.0"
dependencies = ["tabulate", "ruff"]