Getting ready for Testing

This commit is contained in:
marcelbls 2025-11-06 14:36:42 +01:00
parent 606b65d42a
commit 33cd450bf8
7 changed files with 37 additions and 2 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/matrixmania/dist/

View File

16
matrixmania/README.md Normal file
View File

@ -0,0 +1,16 @@
## Compute.py
### Functions:
**matmul(matrix_a, matrix_b):**
Multipliziert zwei Matrizen miteinander und gibt das Produkt als neue Matrix zurück.
Wirft einen ValueError, wenn die Matrizen aufgrund unpassender Dimensionen nicht multiplizierbar sind.
**transpose(matrix):**
Gibt die Transponierte einer gegebenen Matrix zurück (Zeilen und Spalten werden vertauscht).
Überprüft, ob die Matrix leer oder fehlerhaft aufgebaut ist, und wirft in diesem Fall einen ValueError.
**rot_2D(angle):**
Erzeugt eine 2D-Rotationsmatrix für einen gegebenen Winkel (in Grad).
Diese Matrix kann verwendet werden, um Punkte in der Ebene um den Ursprung zu rotieren.

1
matrixmania/__init__.py Normal file
View File

@ -0,0 +1 @@
from .compute import matmul, transpose, rot_2D

View File

@ -61,10 +61,10 @@ def transpose(matrix: list[list[int]]) -> list[list[int]]:
return ergebnis2 return ergebnis2
def rot_2D(angle: int) -> List[List[int]]: def rot_2D(angle: int) -> List[List[float]]:
""" """
Rotation matrix Rotation matrix
:param angle: any angle :param angle: any angle in degrees
:return: rotation matrix :return: rotation matrix
""" """
zahl1 = math.cos(math.radians(angle)) zahl1 = math.cos(math.radians(angle))

View File

@ -0,0 +1,17 @@
[project]
name = "matrixmania_marcel"
version = "0.1.0"
description = "MatrixMania: Simple linear algebra functions for teaching (matmul, transpose, rot_2D)."
authors = [
{ name="Dein Name", email="deine.mail@th-nuernberg.de" }
]
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.7"
dependencies = ["tabulate"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["matrixmania"]