From c110757218716c5c568201247dfda7be394455f9 Mon Sep 17 00:00:00 2001 From: naimabannert Date: Sat, 17 Oct 2026 14:10:49 +0200 Subject: [PATCH] =?UTF-8?q?Abh=C3=A4ngigkeiten=20erg=C3=A4nzt=20und=20Matr?= =?UTF-8?q?ixausgabe=20formatiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compute.py | 7 +++---- pyproject.toml | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compute.py b/compute.py index 30d7c8f..7dc9cbc 100644 --- a/compute.py +++ b/compute.py @@ -1,6 +1,7 @@ # Matrixfunktionen für MatrixMania """Functions for matrix calculations.""" - +import math +from tabulate import tabulate def _validate_matrix(matrix: list[list[int | float]], name: str) -> tuple[int, int]: """Validate a non-empty, rectangular matrix with numeric entries. @@ -131,9 +132,6 @@ def rotate(matrix: list[list[int | float]]) -> list[list[int | float]]: return [row[::-1] for row in transposed] -import math - - def rot_2D(theta: float) -> list[list[float]]: """Return the 2D rotation matrix for an angle in radians. @@ -228,5 +226,6 @@ if __name__ == "__main__": ) print("Test 9 passed:", rotation_90) + print(tabulate(rot_2D(1.0))) diff --git a/pyproject.toml b/pyproject.toml index 54dbd8c..2f2d6aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,3 +2,4 @@ [project] name = "matrixmania" version = "0.1.0" +dependencies = ["tabulate", "ruff"]