Skip to content Skip to sidebar Skip to footer

Multiply Two 1*k Vectors But Got No Matches For: Real ~ Normal(matrix, Real) Error In Pystan

Now I am implementing the pmf model as below: pmf_code = ''' data { int K; //number of factors int N; //number of user int M; //numbe

Solution 1:

Stan is a statically typed language. A vector multiplied by a row_vector will result in a matrix. In this case, it's a 1x1 matrix. For the return type of operator*, see page 355 of the v2.9.0 version of the manual.

Rather than multiplying, use dot_product() instead.

Post a Comment for "Multiply Two 1*k Vectors But Got No Matches For: Real ~ Normal(matrix, Real) Error In Pystan"