Skip to content

Commit 01bce44

Browse files
Use numpy.tanh()
1 parent ddbafaa commit 01bce44

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/Ensemble.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import warnings
55
import numpy as np
66
import time
7-
from scipy.special import tanh, sinh, cosh
7+
#from scipy.special import tanh, sinh, cosh
88

99

1010
"""
@@ -4201,7 +4201,7 @@ def w_to_a(w, T):
42014201
if T == 0.0:
42024202
a[:] = np.sqrt(1.0 / (2.0 * w))
42034203
else:
4204-
a[:] = np.sqrt((1.0 / tanh(0.5 * w * 315774.65221921849 / T)) / (2.0 * w))
4204+
a[:] = np.sqrt((1.0 / np.tanh(0.5 * w * 315774.65221921849 / T)) / (2.0 * w))
42054205
return a
42064206

42074207
#-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)