Spec-Zone.ru › Polars

polars.Expr.dot

Expr.dot(
    other: Expr | str_,
) → Expr

Compute the dot/inner product between two Expressions.

engine:In MemoryStreamingDistributed
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  │
└─────┘

© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/expressions/api/polars.Expr.dot.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API