dot product
var Float64Array = require( `@stdlib/array/float64` );
var array = require( `@stdlib/ndarray/array` );
var x = array( new Float64Array( [ 4.0, 2.0, -3.0, 5.0, -1.0 ] ) );
var y = array( new Float64Array( [ 2.0, 6.0, -1.0, -4.0, 8.0 ] ) );
var z = ddot( x, y );
// returns -5.0
Computes the dot product of two double-precision floating-point vectors.
first argument must be a 1-dimensional
ndarray
containing double-precision floating-point numberssecond argument must be a 1-dimensional
ndarray
containing double-precision floating-point numbersinput arrays must be the same length