blosc2.sin#

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

Compute the trigonometric sine, element-wise.

Parameters:

ndarr (NDArray or NDField or C2Array or LazyExpr) – The input array containing angles in radians.

Returns:

out – A lazy expression representing the sine of the input angles. The result can be evaluated.

Return type:

LazyExpr

References

np.sin

Examples

>>> import numpy as np
>>> import blosc2
>>> angles = np.array([0, np.pi/6, np.pi/4, np.pi/2, np.pi])
>>> nd_array = blosc2.asarray(angles)
>>> result_ = blosc2.sin(nd_array)
>>> result = result_[:]
>>> print("Angles in radians:", angles)
Angles in radians: [0.         0.52359878 0.78539816 1.57079633 3.14159265]
>>> print("Sine of the angles:", result)
Sine of the angles: [0.00000000e+00 5.00000000e-01 7.07106781e-01 1.00000000e+00
1.22464680e-16]