Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.arccosh

Contents

jax.numpy.arccosh#

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

Calculate element-wise inverse of hyperbolic cosine of input.

JAX implementation ofnumpy.arccosh.

The inverse of hyperbolic cosine is defined by:

\[arccosh(x) = \ln(x + \sqrt{x^2 - 1})\]
Parameters:

x (ArrayLike) – input array or scalar.

Returns:

An array of same shape asx containing the inverse of hyperbolic cosineof each element ofx, promoting to inexact dtype.

Return type:

Array

Note

  • jnp.arccosh returnsnan for real-values in the range[-inf,1).

  • jnp.arccosh follows the branch cut convention ofnumpy.arccoshfor complex inputs.

See also

Examples

>>>x=jnp.array([[1,3,-4],...[-5,2,7]])>>>withjnp.printoptions(precision=3,suppress=True):...jnp.arccosh(x)Array([[0.   , 1.763,   nan],       [  nan, 1.317, 2.634]], dtype=float32)

For complex-valued input:

>>>x1=jnp.array([-jnp.inf+0j,1+2j,-5+0j])>>>withjnp.printoptions(precision=3,suppress=True):...jnp.arccosh(x1)Array([  inf+3.142j, 1.529+1.144j, 2.292+3.142j], dtype=complex64)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp