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