Skip to content

Commit

Permalink
get rid of const qualifier
Browse files Browse the repository at this point in the history
  • Loading branch information
weberse2 committed Feb 11, 2020
1 parent f541961 commit c4d39e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stan/math/rev/functor/gradient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void gradient(const F& f, const Eigen::Matrix<double, Eigen::Dynamic, 1>& x,
double& fx, Eigen::Matrix<double, Eigen::Dynamic, 1>& grad_fx) {
start_nested();
try {
const Eigen::Matrix<var, Eigen::Dynamic, 1> x_var(x);
Eigen::Matrix<var, Eigen::Dynamic, 1> x_var(x);
var fx_var = f(x_var);
fx = fx_var.val();
grad_fx.resize(x.size());
Expand Down

0 comments on commit c4d39e4

Please sign in to comment.