tabulate Implementierung: compute.py, pyproject.toml
This commit is contained in:
1 parent
cc617ac1bf
commit
2bb88d6d0b
2 files changed
+8
-1
No files matched your search
@@ -1,5 +1,8 @@
|
|||||||
|
|
||||||
import math
|
import math
|
||||||
|
|
||||||
|
from tabulate import tabulate
|
||||||
|
|
||||||
|
|
||||||
def matmul(a: list[list[float]], b: list[list[float]]) -> list[list[float]]:
|
def matmul(a: list[list[float]], b: list[list[float]]) -> list[list[float]]:
|
||||||
"""Multiplicates two matrices.
|
"""Multiplicates two matrices.
|
||||||
@@ -193,6 +196,9 @@ if __name__ == "__main__":
|
|||||||
for row in matmul(r, [[1.0], [0.0]]):
|
for row in matmul(r, [[1.0], [0.0]]):
|
||||||
print([round(v, 10) for v in row])
|
print([round(v, 10) for v in row])
|
||||||
|
|
||||||
|
# Matrix in Tabelle ausgeben
|
||||||
|
print(tabulate(rot_2D(1.0)))
|
||||||
|
|
||||||
# Docstring und Type Hints sind vorhanden und stimmen mit dem Code überein.
|
# Docstring und Type Hints sind vorhanden und stimmen mit dem Code überein.
|
||||||
# Fehlerfälle werden behandelt
|
# Fehlerfälle werden behandelt
|
||||||
# Namen sind Aussagekräftig
|
# Namen sind Aussagekräftig
|
||||||
+2
-1
@@ -1,3 +1,4 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "matrixmania"
|
name = "matrixmania"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
dependencies = ["tabulate", "ruff"]
|
||||||
Reference in new issue
Block a user