module pixeltable.functions.math
Pixeltable UDFs for mathematical operations. Example:udf abs()
Signature
builtins.abs().
udf bitwise_and()
Signature
self & other.
udf bitwise_or()
Signature
self | other.
udf bitwise_xor()
Signature
self ^ other.
udf ceil()
Signature
float(math.ceil(self)) if self
is finite, or self itself if self is infinite. (This is slightly different from the default behavior of
math.ceil(self), which always returns an int and raises an error if self is infinite. The behavior in
Pixeltable generalizes the Python operator and is chosen to align with the SQL standard.)
udf floor()
Signature
float(math.floor(self)) if self
is finite, or self itself if self is infinite. (This is slightly different from the default behavior of
math.floor(self), which always returns an int and raises an error if self is infinite. The behavior of
Pixeltable generalizes the Python operator and is chosen to align with the SQL standard.)
udf pow()
Signature
self to the power of other.
Equivalent to Python self ** other.
udf round()
Signature
builtins.round(self, digits or 0).
Note that if digits is not specified, the behavior matches builtins.round(self, 0) rather than
builtins.round(self); this ensures that the return type is always float (as in SQL) rather than int.