Skip to content

daft.functions.log#

log #

log(expr: Expression, base: int | float = e) -> Expression

The elementwise log with given base, of a numeric expression.

Parameters:

Name Type Description Default
expr Expression

The expression to take the logarithm of

required
base int | float

The base of the logarithm. Defaults to e.

e
Source code in daft/functions/numeric.py
181
182
183
184
185
186
187
188
def log(expr: Expression, base: int | float = math.e) -> Expression:
    """The elementwise log with given base, of a numeric expression.

    Args:
        expr: The expression to take the logarithm of
        base: The base of the logarithm. Defaults to e.
    """
    return Expression._call_builtin_scalar_fn("log", expr, base)