add some mathematical functions ; mostly from the math lessons themselfs

This commit is contained in:
2026-05-13 09:40:28 +02:00
parent 275ca96e74
commit 4519ee2076
3 changed files with 181 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
# helper for standard deviation
# book page: 235
# AGPL-3.0
import numpy as np
def r_stddev(lst: list, r_dtype) -> float:
r_arr = np.asarray(lst)
return float(np.std(r_arr, dtype=r_dtype))
def implemenentation():
print(r_stddev(sorted([6,4,9,5,7,11,5,3,7,5,4]),float))
implemenentation()