cf.Data.arctanh

Data.arctanh(inplace=False)[source]

Take the inverse hyperbolic tangent of the data element-wise.

Units are ignored in the calculation. The result has units of radians.

New in version 3.2.0.

See also

tanh, arcsinh, arccosh, arctan

Parameters
inplace: bool, optional

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

Returns

Data or None

Examples

>>> print(d.array)
[[0.5 0.7]
 [0.9 1.1]]
>>> e = d.arctanh()
>>> e.Units
<Units: radians>
>>> print(e.array)
[[0.54930614 0.86730053]
 [1.47221949        nan]]
>>> print(d.array)
[1.2 1.0 0.8 0.6 --]
>>> d.arctanh(inplace=True)
>>> print(d.array)
[nan inf 1.0986122886681098 0.6931471805599453 --]
>>> d.masked_invalid(inplace=True)
>>> print(d.array)
[-- -- 1.0986122886681098 0.6931471805599453 --]