Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.arccos

Contents

jax.numpy.arccos#

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

Compute element-wise inverse of trigonometric cosine of input.

JAX implementation ofnumpy.arccos.

Parameters:

x (ArrayLike) – input array or scalar.

Returns:

An array containing the inverse trigonometric cosine of each element ofxin radians in the range[0,pi], promoting to inexact dtype.

Return type:

Array

Note

  • jnp.arccos returnsnan whenx is real-valued and not in the closedinterval[-1,1].

  • jnp.arccos follows the branch cut convention ofnumpy.arccos forcomplex inputs.

See also

Examples

>>>x=jnp.array([-2,-1,-0.5,0,0.5,1,2])>>>withjnp.printoptions(precision=3,suppress=True):...jnp.arccos(x)Array([  nan, 3.142, 2.094, 1.571, 1.047, 0.   ,   nan], dtype=float32)

For complex inputs:

>>>withjnp.printoptions(precision=3,suppress=True):...jnp.arccos(4-1j)Array(0.252+2.097j, dtype=complex64, weak_type=True)
Contents

[8]ページ先頭

©2009-2025 Movatter.jp