Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.sinh

Contents

jax.numpy.sinh#

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

Calculate element-wise hyperbolic sine of input.

JAX implementation ofnumpy.sinh.

The hyperbolic sine is defined by:

\[sinh(x) = \frac{e^x - e^{-x}}{2}\]
Parameters:

x (ArrayLike) – input array or scalar.

Returns:

An array containing the hyperbolic sine of each element ofx, promotingto inexact dtype.

Return type:

Array

Note

jnp.sinh is equivalent to computing-1j*jnp.sin(1j*x).

See also

Examples

>>>x=jnp.array([[-2,3,5],...[0,-1,4]])>>>withjnp.printoptions(precision=3,suppress=True):...jnp.sinh(x)Array([[-3.627, 10.018, 74.203],       [ 0.   , -1.175, 27.29 ]], dtype=float32)>>>withjnp.printoptions(precision=3,suppress=True):...-1j*jnp.sin(1j*x)Array([[-3.627+0.j, 10.018-0.j, 74.203-0.j],       [ 0.   -0.j, -1.175+0.j, 27.29 -0.j]],      dtype=complex64, weak_type=True)

For complex-valued input:

>>>withjnp.printoptions(precision=3,suppress=True):...jnp.sinh(3-2j)Array(-4.169-9.154j, dtype=complex64, weak_type=True)>>>withjnp.printoptions(precision=3,suppress=True):...-1j*jnp.sin(1j*(3-2j))Array(-4.169-9.154j, dtype=complex64, weak_type=True)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp