cf.FieldAncillary.exp

FieldAncillary.exp(inplace=False, i=False)[source]

The exponential of the data, element-wise.

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

See also

log

Parameters:
inplace: bool, optional

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

i: deprecated at version 3.0.0

Use inplace parameter instead.

Returns:

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

Examples:

>>> f.data
<CF Data(1, 2): [[1, 2]]>
>>> f.exp().data            
<CF Data(1, 2): [[2.71828182846, 7.38905609893]]>
>>> f.data
<CF Data(1, 2): [[1, 2]] 2>
>>> f.exp().data            
<CF Data(1, 2): [[7.38905609893, 54.5981500331]]>
>>> f.data
<CF Data(1, 2): [[1, 2]] kg m-1 s-2>
>>> f.exp()          
ValueError: Can't take exponential of dimensional quantities: <Units: kg m-1 s-2>