Added usage of tabulate
This commit is contained in:
1 parent
636a8f2a50
commit
adf037310d
1 file changed
+4
-1
+4
-1
@@ -8,8 +8,9 @@ This module provides utilities for basic matrix arithmetic:
|
|||||||
All functions validate inputs and raise ``ValueError`` where
|
All functions validate inputs and raise ``ValueError`` where
|
||||||
appropriate. Type hints use the built‑in ``list`` and ``int | float`` union.
|
appropriate. Type hints use the built‑in ``list`` and ``int | float`` union.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from tabulate import tabulate
|
||||||
import math
|
import math
|
||||||
|
|
||||||
# Public type alias for a matrix of numeric values.
|
# Public type alias for a matrix of numeric values.
|
||||||
@@ -162,3 +163,5 @@ if __name__ == "__main__":
|
|||||||
vec = [[1], [0]]
|
vec = [[1], [0]]
|
||||||
print("Rotation matrix for 45°:", rot)
|
print("Rotation matrix for 45°:", rot)
|
||||||
print("Rotated vec:", matmul(rot, vec))
|
print("Rotated vec:", matmul(rot, vec))
|
||||||
|
|
||||||
|
print(tabulate(rot_2D(1.0)))
|
||||||
Reference in new issue
Block a user