(rontolisp) docs
← Functions

linalg:dot

(linalg:dot a b)

The numpy-style dot product, dispatching on the operand ranks: vector . vector gives a scalar (the inner product), matrix . vector and vector . matrix give a vector, and matrix . matrix gives the matrix product. A scalar operand multiplies elementwise, like linalg:mul. Mismatched inner dimensions signal an error. When only the matrix product is intended, linalg:matmul additionally rejects scalar operands.