numpy.lib.scimath.arctanh
-
lib.scimath.arctanh(x)
[source] -
Compute the inverse hyperbolic tangent of
x
.Return the “principal value” (for a description of this, see
numpy.arctanh
) ofarctanh(x)
. For realx
such thatabs(x) < 1
, this is a real number. Ifabs(x) > 1
, or ifx
is complex, the result is complex. Finally,x = 1
returns``inf`` andx=-1
returns-inf
.- Parameters
-
-
xarray_like
-
The value(s) whose arctanh is (are) required.
-
- Returns
-
-
outndarray or scalar
-
The inverse hyperbolic tangent(s) of the
x
value(s). Ifx
was a scalar so isout
, otherwise an array is returned.
-
See also
Notes
For an arctanh() that returns
NAN
when realx
is not in the interval(-1,1)
, usenumpy.arctanh
(this latter, however, does return +/-inf forx = +/-1
).Examples
>>> 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])
© 2005–2021 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/1.21/reference/generated/numpy.lib.scimath.arctanh.html