Getting ready for Testing
This commit is contained in:
parent
606b65d42a
commit
33cd450bf8
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/matrixmania/dist/
|
||||
16
matrixmania/README.md
Normal file
16
matrixmania/README.md
Normal 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
1
matrixmania/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from .compute import matmul, transpose, rot_2D
|
||||
@ -61,10 +61,10 @@ def transpose(matrix: list[list[int]]) -> list[list[int]]:
|
||||
return ergebnis2
|
||||
|
||||
|
||||
def rot_2D(angle: int) -> List[List[int]]:
|
||||
def rot_2D(angle: int) -> List[List[float]]:
|
||||
"""
|
||||
Rotation matrix
|
||||
:param angle: any angle
|
||||
:param angle: any angle in degrees
|
||||
:return: rotation matrix
|
||||
"""
|
||||
zahl1 = math.cos(math.radians(angle))
|
||||
17
matrixmania/pyproject.toml
Normal file
17
matrixmania/pyproject.toml
Normal 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"]
|
||||
Loading…
x
Reference in New Issue
Block a user