snowflake.snowpark.functions.vector_inner_product¶

snowflake.snowpark.functions.vector_inner_product(v1: Union[Column, str], v2: Union[Column, str]) → Column[source]¶

Returns the inner product between two vectors of equal dimension and element type.

Example::
>>> from snowflake.snowpark.functions import vector_inner_product
>>> df = session.sql("select [1,2,3]::vector(int,3) as a, [2,3,4]::vector(int,3) as b")
>>> df.select(vector_inner_product(df.a, df.b).as_("dist")).show()
----------
|"DIST"  |
----------
|20.0    |
----------
Copy