Compute element-wise inverse of trigonometric cosine of input.
JAX implementation of numpy.arccos
.
x (ArrayLike) – input array or scalar.
An array containing the inverse trigonometric cosine of each element of x
in radians in the range [0, pi]
, promoting to inexact dtype.
Note
jnp.arccos
returns nan
when x
is real-valued and not in the closed interval [-1, 1]
.
jnp.arccos
follows the branch cut convention of numpy.arccos
for complex inputs.
Examples
>>> x = jnp.array([-2, -1, -0.5, 0, 0.5, 1, 2]) >>> with jnp.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:
>>> with jnp.printoptions(precision=3, suppress=True): ... jnp.arccos(4-1j) Array(0.252+2.097j, dtype=complex64, weak_type=True)
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.4