blosc2.arctanh#

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

Compute the inverse hyperbolic tangent, element-wise.

Parameters:

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

Returns:

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

Return type:

LazyExpr

References

np.arctanh

Examples

>>> import numpy as np
>>> import blosc2
>>> values = np.array([-0.9, -0.5, 0, 0.5, 0.9])
>>> ndarray = blosc2.asarray(values)
>>> result_lazy = blosc2.arctanh(ndarray)
>>> result = result_lazy[:]
>>> print("Original values:", values)
Original values: [-0.9 -0.5  0.   0.5  0.9]
>>> print("Arctanh:", result)
Arctanh: [-1.47221949 -0.54930614  0.          0.54930614  1.47221949]