The logarithm of the data array.
By default the natural logarithm is taken, but any base may be specified.
See also
Examples 1: |
---|
>>> g = f.log()
Parameters: |
|
---|---|
Returns: |
|
Examples: | |
Examples 2: |
>>> f.data
<CF Data: [[1, 2]]>
>>> f.log().data
<CF Data: [[0.0, 0.69314718056]] ln(re 1)>
>>> f.data
<CF Data: [[1, 2]] 2>
>>> f.log().data
<CF Data: [[0.0, 0.69314718056]] ln(re 2 1)>
>>> f.data
<CF Data: [[1, 2]] kg s-1 m-2>
>>> f.log().data
<CF Data: [[0.0, 0.69314718056]] ln(re 1 m-2.kg.s-1)>
>>> g = f.log(i=True)
>>> g is f
True
>>> f.Units
<CF Units: >
>>> f.log()
ValueError: Can't take the logarithm to the base 2.718281828459045 of <CF Units: >