add some mathematical functions ; mostly from the math lessons themselfs
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user