jax.numpy.arcsinh#
- jax.numpy.arcsinh(x, /)[source]#
Calculate element-wise inverse of hyperbolic sine of input.
JAX implementation of
numpy.arcsinh
.The inverse of hyperbolic sine is defined by:
\[arcsinh(x) = \ln(x + \sqrt{1 + x^2})\]- Parameters:
x (ArrayLike) – input array or scalar.
- Returns:
An array of same shape as
x
containing the inverse of hyperbolic sine of each element ofx
, promoting to inexact dtype.- Return type:
Note
jnp.arcsinh
returnsnan
for values outside the range(-inf, inf)
.jnp.arcsinh
follows the branch cut convention ofnumpy.arcsinh
for complex inputs.
See also
jax.numpy.sinh()
: Computes the element-wise hyperbolic sine of the input.jax.numpy.arccosh()
: Computes the element-wise inverse of hyperbolic cosine of the input.jax.numpy.arctanh()
: Computes the element-wise inverse of hyperbolic tangent of the input.
Examples
>>> x = jnp.array([[-2, 3, 1], ... [4, 9, -5]]) >>> with jnp.printoptions(precision=3, suppress=True): ... jnp.arcsinh(x) Array([[-1.444, 1.818, 0.881], [ 2.095, 2.893, -2.312]], dtype=float32)
For complex-valued inputs:
>>> x1 = jnp.array([4-3j, 2j]) >>> with jnp.printoptions(precision=3, suppress=True): ... jnp.arcsinh(x1) Array([2.306-0.634j, 1.317+1.571j], dtype=complex64)