diff --git a/src/perturbation.py b/src/perturbation.py index ec9d87875..1a1e26a4c 100644 --- a/src/perturbation.py +++ b/src/perturbation.py @@ -69,7 +69,7 @@ def init_perturbations(n, kmin, kmax, dtype): def normalize(fx, fy, fz): - norm = np.sqrt(np.sum(fx**2 + fy**2 + fz**2)/np.product(n)) + norm = np.sqrt(np.sum(fx**2 + fy**2 + fz**2)/np.prod(n)) fx = fx/norm fy = fy/norm fz = fz/norm @@ -162,7 +162,7 @@ def get_erot_ke_ratio(pertx, perty, pertz, rad=-1.0): r2[idx0] = 0.0 erot_ke_ratio = (np.sum(y*pertz-z*perty)**2 + np.sum(z*pertx-x*pertz)**2 + - np.sum(x*perty-y*pertx)**2)/(np.sum(r2)*np.product(n)) + np.sum(x*perty-y*pertx)**2)/(np.sum(r2)*np.prod(n)) return erot_ke_ratio