cf.Data.tan

Data.tan(i=False)[source]

Take the trigonometric tangent of the data array element-wise.

Units are accounted for in the calculation. If the units are not equivalent to radians (such as Kelvin) then they are treated as if they were radians. For example, the the tangent of 45 degrees_east is 1.0, as is the tangent of 0.78539816 radians.

The Units are changed to '1' (nondimensionsal).

See also

cos, sin

Parmaeters:
i
: bool, optional

If True then update the data array in place. By default a new data array is created.

Returns:

out : cf.Data

Examples:
>>> d.Units
<CF Units: degrees_north>
>>> print d.array
[[-45 0 45 --]]
>>> d.tan()
>>> d.Units
<CF Units: 1>
>>> print d.array
[[-1.0 0.0 1.0 --]]
>>> d.Units
<CF Units: m s-1>
>>> print d.array
[[1 2 3 --]]
>>> d.tan()
>>> d.Units
<CF Units: 1>
>>> print d.array
[[1.55740772465 -2.18503986326 -0.142546543074 --]]