tan
Description
Calculate the triangular tangent of each element, that is, tan(x).
Mandatory Input Parameters
Parameter |
Type |
Description |
|---|---|---|
x |
array_like |
Input array or scalar, in radians |
Optional Input Parameters
Return Value
Type |
Description |
|---|---|
ndarray/scalar |
Triangular tangent of each element |
Examples
>>> import numpy as np
>>> np.tan(np.pi / 4)
0.9999999999999999
>>> x = np.array([0., 30., 45., 60., 90.]) * np.pi / 180.0
>>> np.tan(x)
array([0.00000000e+00, 5.77350269e-01, 1.00000000e+00, 1.73205081e+00,
1.63312394e+16])
>>>
Parent topic: Basic Operation Functions