lib.scimath.
arctanh
计算反双曲正切 x .
返回“principal value”(有关此项的说明,请参阅 numpy.arctanh 的) arctanh(x) . 真的吗 x 这样的话 abs(x) < 1 ,这是一个实数。如果 abs(x) > 1 ,或者,如果 x 是复杂的,结果是复杂的。最后, x = 1 返回``inf``和 x=-1 收益率 -inf .
numpy.arctanh
arctanh(x)
abs(x) < 1
x=-1
-inf
需要arctanh的值。
反双曲正切 x 值。如果 x 是标量,也是标量 out ,否则返回数组。
参见
笔记
对于返回的arctanh() NAN 什么时候是真的 x 不在间隔内 (-1,1) 使用 numpy.arctanh (但是,后者确实返回+/-inf) x = +/-1 )
NAN
(-1,1)
x = +/-1
实例
>>> np.set_printoptions(precision=4)
>>> from numpy.testing import suppress_warnings >>> with suppress_warnings() as sup: ... sup.filter(RuntimeWarning) ... np.emath.arctanh(np.eye(2)) array([[inf, 0.], [ 0., inf]]) >>> np.emath.arctanh([1j]) array([0.+0.7854j])