From e1b58f1c88dc6af44e2efdc79f9e4f248171b0db Mon Sep 17 00:00:00 2001 From: rajan Date: Thu, 15 Oct 2026 13:44:39 +0200 Subject: [PATCH] =?UTF-8?q?tabulate=20und=20ruff=20als=20Abh=C3=A4ngigkeit?= =?UTF-8?q?en,=20Matrixausgabe=20in=20compute.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compute.py | 6 +++--- pyproject.toml | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/compute.py b/compute.py index b9e0e77..bd0db1a 100644 --- a/compute.py +++ b/compute.py @@ -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.") \ No newline at end of file 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