blosc2.arccos#

blosc2.arccos(ndarr: NDArray | NDField | C2Array | LazyExpr, /) LazyExpr#

Compute the inverse cosine, element-wise.

Parameters:

ndarr (NDArray or NDField or C2Array or LazyExpr) – The input array.

Returns:

out – A lazy expression representing the inverse cosine of the input array. The result can be evaluated.

Return type:

LazyExpr

References

np.arccos

Examples

>>> import numpy as np
>>> import blosc2
>>> numbers = np.array([-1, -0.5, 0, 0.5, 1])
>>> ndarray = blosc2.asarray(numbers)
>>> result_lazy = blosc2.arccos(ndarray)
>>> result = result_lazy[:]
>>> print("Original numbers:", numbers)
Original numbers: [-1.  -0.5  0.   0.5  1. ]
>>> print("Arccos:", result)
Arccos: [3.14159265 2.0943951  1.57079633 1.04719755 0.        ]