From f1861b4a395784d5702647ffc75c39327b6430f5 Mon Sep 17 00:00:00 2001 From: layannaif Date: Tue, 20 Oct 2026 12:47:16 +0200 Subject: [PATCH] =?UTF-8?q?Matrixfunktionen=20hinzugef=C3=BCgt=20und=20for?= =?UTF-8?q?matiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compute.py | 7 ++++--- pyproject.toml | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/compute.py b/compute.py index 7f9d792..cd7a917 100644 --- a/compute.py +++ b/compute.py @@ -20,6 +20,8 @@ Python's built‑in integer and float handling. import math +from tabulate import tabulate + def rot_2D(theta: float) -> list[list[float]]: """Return the 2‑D rotation matrix for a given angle. @@ -85,7 +87,6 @@ def matmul(a: list[list[float | int]], b: list[list[float | int]]) -> list[list[ return result - def transpose(matrix: list[list[float | int]]) -> list[list[float | int]]: """Return the transpose of the given matrix. @@ -139,5 +140,5 @@ if __name__ == "__main__": matrix_c = matmul(matrix_a, matrix_b) for row in matrix_c: print(row) - print("\nRotation matrix 90°:\n", rot_2D(math.pi/2)) - + print("\nRotation matrix 90°:\n", rot_2D(math.pi / 2)) + print(tabulate(rot_2D(1.0))) 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