cf.DimensionCoordinate.sin

DimensionCoordinate.sin(*args, **kwargs)[source]

Take the trigonometric sine of the data element-wise.

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

The Units are changed to ‘1’ (nondimensional).

See also

arcsin, cos, tan, sinh

Parameters
bounds: bool, optional

If False then do not alter any bounds. By default any bounds are also altered.

inplace: bool, optional

If True then do the operation in-place and return None.

i: deprecated at version 3.0.0

Use the inplace parameter instead.

Returns
DimensionCoordinate or None

The construct with the sine of data values. If the operation was in-place then None is returned.

Examples

>>> f.Units
<Units: degrees_north>
>>> print(f.array)
[[-90 0 90 --]]
>>> g = f.sin()
>>> g.Units
<Units: 1>
>>> print(g.array)
[[-1.0 0.0 1.0 --]]
>>> f.Units
<Units: m s-1>
>>> print(f.array)
[[1 2 3 --]]
>>> f.sin(inplace=True)
>>> f.Units
<Units: 1>
>>> print(f.array)
[[0.841470984808 0.909297426826 0.14112000806 --]]