A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.jax.dev/en/latest/_autosummary/jax.numpy.arctanh.html below:

jax.numpy.arctanh — JAX documentation

jax.numpy.arctanh#
jax.numpy.arctanh(x, /)[source]#

Calculate element-wise inverse of hyperbolic tangent of input.

JAX implementation of numpy.arctanh.

The inverse of hyperbolic tangent is defined by:

\[arctanh(x) = \frac{1}{2} [\ln(1 + x) - \ln(1 - x)]\]

Parameters:

x (ArrayLike) – input array or scalar.

Returns:

An array of same shape as x containing the inverse of hyperbolic tangent of each element of x, promoting to inexact dtype.

Return type:

Array

Note

Examples

>>> x = jnp.array([-2, -1, -0.5, 0, 0.5, 1, 2])
>>> with jnp.printoptions(precision=3, suppress=True):
...   jnp.arctanh(x)
Array([   nan,   -inf, -0.549,  0.   ,  0.549,    inf,    nan], dtype=float32)

For complex-valued input:

>>> x1 = jnp.array([-2+0j, 3+0j, 4-1j])
>>> with jnp.printoptions(precision=3, suppress=True):
...   jnp.arctanh(x1)
Array([-0.549+1.571j,  0.347+1.571j,  0.239-1.509j], dtype=complex64)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3