polars.Expr.dot#
- Expr.dot(other: Expr | str) Self [source]#
Compute the dot/inner product between two Expressions.
- Parameters:
- other
Expression to compute dot product with.
Examples
>>> df = pl.DataFrame( ... { ... "a": [1, 3, 5], ... "b": [2, 4, 6], ... } ... ) >>> df.select(pl.col("a").dot(pl.col("b"))) shape: (1, 1) ┌─────┐ │ a │ │ --- │ │ i64 │ ╞═════╡ │ 44 │ └─────┘