cf.Units.log

Units.log(base)[source]

Return the logarithmic unit corresponding to the given logarithmic base.

Parameters:
base : int or float

The logarithmic base.

Returns:
out : Units

The logarithmic unit corresponding to the given logarithmic base.

Examples:
>>> u = Units('W', names=True)
>>> u
<CF Units: watt>
>>> u.log(10)
<CF Units: lg(re 1 W)>
>>> u.log(2)
<CF Units: lb(re 1 W)>
>>> import math
>>> u.log(math.e)
<CF Units: ln(re 1 W)>
>>> u.log(3.5)
<CF Units: 0.798235600147928 ln(re 1 W)>