Some testing also shows that numpy.tanh and cmath.tanh give the same answers now (as far as I can tell), no longer requiring special casing for abs(sqrtpSc[0]) < 200.
To illustrate:
import cmath
import numpy as np
a = np.arange(0.01, 200.0, 0.1)
b = np.tanh(a)
c = np.array([cmath.tanh(e) for e in a])
assert np.allclose(b, c.real)
This gets rid of a bug where certain resistance or storage values would result in an error, because cmath_tanh is not defined anywhere currently.
Some testing also shows that numpy.tanh and cmath.tanh give the same answers now (as far as I can tell), no longer requiring special casing for abs(sqrtpSc[0]) < 200.
To illustrate:
This gets rid of a bug where certain resistance or storage values would result in an error, because
cmath_tanh
is not defined anywhere currently.