I’m working on the gradients for a function where one of the inputs has the signature `std::vector<Eigen::Matrix<T, Eigen::Dynamic, 1> >`

(i.e. an array of vectors), and I’m having some trouble with `operands_and_partials`

.

The gradients are entered as:

```
operands_and_partials<T_theta, T_lam> ops_partials(theta, lambda);
ops_partials.edge1_.partials_ = theta_deriv;
ops_partials.edge2_.partials_ = lam_deriv;
```

Where `lambda`

and `lam_deriv`

are arrays of vectors.

The function and test runs fine when working with `math/prim`

, but both `fwd`

and `rev`

fail with the error “`no member named partials_`

”

However, both `fwd`

and `rev`

work perfectly with `partials_vec_`

:

```
ops_partials.edge2_.partials_vec_ = lam_deriv;
```

This then causes the `prim`

test to fail, because there’s no definition for `partials_vec_`

in the `prim/scal`

version of operands_and_partials (but it’s mentioned in the doxygen, so it looks like it was there at some point?).

Is there a better way of entering the gradients in this case?