Documentation

    array_negative_inner_product

    Computes the negative inner product between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.

    Also available as array_negative_dot_product.

    Try an expression

    In Formula, enter the expression and set Output type to FLOAT.

    Expression

    array_negative_inner_product(array_value(1.0::FLOAT, 2.0::FLOAT, 3.0::FLOAT), array_value(2.0::FLOAT, 3.0::FLOAT, 4.0::FLOAT))

    Result

    -20.0

    To use your own data, replace the example values with column names. Keep format strings and other options as written.

    Arguments and types

    array_negative_inner_product(array1, array2)
    array1
    List
    array2
    List
    Supported signatures (2)
    array_negative_inner_product(array1: DOUBLE[ANY], array2: DOUBLE[ANY]) → DOUBLE
    array_negative_inner_product(array1: FLOAT[ANY], array2: FLOAT[ANY]) → FLOAT

    The result type can depend on the input types. See DuckDB for the full argument rules.

    Things to know

    If the first argument is missing, the result is NULL.

    Browse lists & arraysDuckDB documentation

    Function metadata from DuckDB, used under the MIT license.