blosc2.exp#

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

Calculate the exponential of all elements in the input array.

Parameters:

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

Returns:

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

Return type:

LazyExpr

References

np.exp

Examples

>>> import numpy as np
>>> import blosc2
>>> values = np.array([0, 1, 2, 3, 4])
>>> ndarray = blosc2.asarray(values)
>>> result_lazy = blosc2.exp(ndarray)
>>> result = result_lazy[:]
>>> print("Original values:", values)
Original values: [0 1 2 3 4]
>>> print("Exponential:", result)
Exponential: [ 1.          2.71828183  7.3890561  20.08553692 54.59815003]