blosc2.expm1#

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

Calculate exp(ndarr) - 1 for all elements in the array.

Parameters:

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

Returns:

out – A lazy expression representing exp(ndarr) - 1 of the input array. The result can be evaluated.

Return type:

LazyExpr

References

np.expm1

Examples

>>> import numpy as np
>>> import blosc2
>>> values = np.array([-1, -0.5, 0, 0.5, 1])
>>> ndarray = blosc2.asarray(values)
>>> result_lazy = blosc2.expm1(ndarray)
>>> result = result_lazy[:]
>>> print("Original values:", values)
Original values: [-1.  -0.5  0.   0.5  1. ]
>>> print("Expm1:", result)
Expm1: [-0.63212056 -0.39346934  0.          0.64872127  1.71828183]