This is because the function multiply is only defined for
multiply(int, int) => int
multiply(real, real) => real
multiply(row_vector, vector) => real
multiply(real, vector) => vector
multiply(vector, real) => vector
multiply(matrix, vector) => vector
multiply(complex, complex) => complex
multiply(real, row_vector) => row_vector
multiply(row_vector, real) => row_vector
multiply(row_vector, matrix) => row_vector
multiply(real, matrix) => matrix
multiply(vector, row_vector) => matrix
multiply(matrix, real) => matrix
multiply(matrix, matrix) => matrix
so multiplying an array is not supported.
The only thing you can do is convert it to a vector with to_vector()
.
In general, we recommend using vectors instead of arrays of real if there isn’t a specific reason you need arrays (some functions only accept arrays for example).