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"]