diff options
Diffstat (limited to 'python/analytics/utils.py')
| -rw-r--r-- | python/analytics/utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/python/analytics/utils.py b/python/analytics/utils.py new file mode 100644 index 00000000..a67d6f32 --- /dev/null +++ b/python/analytics/utils.py @@ -0,0 +1,7 @@ +import numpy as np +from scipy.special import h_roots + +def GHquad(n : int): + """Gauss-Hermite quadrature weights""" + Z, w = h_roots(n) + return Z*np.sqrt(2), w/np.sqrt(np.pi) |
