From 16ec3257773d85c6a0a09ff31984c09f6cdfef26 Mon Sep 17 00:00:00 2001 From: Nimra Bhatti Date: Mon, 10 Nov 2025 11:39:09 +0000 Subject: [PATCH] =?UTF-8?q?compute.py=20gel=C3=B6scht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compute.py | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 compute.py diff --git a/compute.py b/compute.py deleted file mode 100644 index 8d6c251..0000000 --- a/compute.py +++ /dev/null @@ -1,31 +0,0 @@ -# compute.py (relevante Funktionen) -from tabulate import tabulate - -import math -from typing import List - -Matrix = List[List[float]] - -def rot_2D(theta: float) -> Matrix: - cos_theta = math.cos(theta) - sin_theta = math.sin(theta) - return [ - [cos_theta, -sin_theta], - [sin_theta, cos_theta] - ] - -def matmul(a: Matrix, b: Matrix) -> Matrix: - if len(a[0]) != len(b): - raise ValueError("Spalten von A müssen gleich Zeilen von B sein.") - result = [[0]*len(b[0]) for _ in range(len(a))] - for i in range(len(a)): - for j in range(len(b[0])): - for k in range(len(b)): - result[i][j] += a[i][k] * b[k][j] - return result - -if _name_ == "_main_": - # habe ich alles selbst programmiert - matrix_a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] - print("Test Matrix A:") - print(tabulate(matrix_a)) ## \ No newline at end of file