blosc2.tan#
- blosc2.tan(ndarr: NDArray | NDField | C2Array | LazyExpr, /) LazyExpr #
Compute the trigonometric tangent, 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 tangent of the input angles. The result can be evaluated.
- Return type:
References
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.tan(nd_array) >>> result = result_[:] >>> print("Angles in radians:", angles) Angles in radians: [0. 0.52359878 0.78539816 1.57079633 3.14159265] >>> print("Tangent of the angles:", result) Tangent of the angles: [ 0.00000000e+00 5.77350269e-01 1.00000000e+00 1.63312394e+16 -1.22464680e-16]