Skip to content

dot

Returns the dot product of two vectors represented as dicts.

Parameters

  • x

    Typedict

  • y

    Typedict

Examples

from river import utils

x = {'x0': 1, 'x1': 2}
y = {'x1': 21, 'x2': 3}

utils.math.dot(x, y)
42