cf.Index.cosh

Index.cosh(*args, **kwargs)[source]

Take the hyperbolic cosine of the data 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 hyperbolic cosine of 0 degrees_east is 1.0, as is the hyperbolic cosine of 1.57079632 radians.

The output units are changed to ‘1’ (nondimensional).

The “standard_name” and “long_name” properties are removed from the result.

New in version 3.1.0.

See also

arccosh, sinh, tanh, cos

Parameters
inplace: bool, optional

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

Returns
Index or None

The construct with the hyperbolic cosine 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.cosh()
>>> g.Units
<Units: 1>
>>> print(g.array)
[[2.5091784786580567 1.0 2.5091784786580567 --]]
>>> f.Units
<Units: m s-1>
>>> print(f.array)
[[1 2 3 --]]
>>> f.cosh(inplace=True)
>>> f.Units
<Units: 1>
>>> print(f.array)
[[1.5430806348152437 3.7621956910836314 10.067661995777765 --]]