Vector declaration

Hi everyone,

I am trying to figure out why this code does not work.
Basically I need a vector of real numbers. I read in several posts that vector[N] a; should be preferred to real a[N]; so am I using the first notation.
The problem is that the function gp_exponential_cov returns an error, although it seems it should be working:

Ill-typed arguments supplied to function 'gp_exponential_cov'. Available signatures: 
(real[], real, real) => matrix
(real[], real[], real, real) => matrix
(vector[], real, real) => matrix
(vector[], real, real[]) => matrix
(vector[], vector[], real, real) => matrix
(vector[], vector[], real, real[]) => matrix
Instead supplied arguments of incompatible type: vector, real, real.

What is the difference between vector and vector[]?
Why is the function not working?
When I do real[N] a; no issues.

Thank you,

What you supplied to the first element of the function, is not a vector. You supplied one element from an array of vectors.
It is a bit shame but I have to admit I don’t know why it is designed like this in stan.
What I know from my past experience is, in the case of one dimensional array of vectors, the object is technically a matrix. Declaration as a matrix have solved similar syntax errors for me.