Skip to content

Commit 4bee386

Browse files
committed
add forwarding to theta_0 in laplace_marginal_density_est
1 parent d03fb1e commit 4bee386

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stan/math/mix/functor/laplace_marginal_density.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ inline auto laplace_marginal_density_est(LLFun&& ll_fun, LLTupleArgs&& ll_args,
500500
};
501501
auto ll_args_vals = value_of(ll_args);
502502
const Eigen::Index theta_size = theta_0.size();
503-
Eigen::VectorXd theta = theta_0;
503+
Eigen::VectorXd theta = std::forward<ThetaVec>(theta_0);
504504
double objective_old = std::numeric_limits<double>::lowest();
505505
double objective_new = std::numeric_limits<double>::lowest() + 1;
506506
Eigen::VectorXd a_prev = Eigen::VectorXd::Zero(theta_size);

0 commit comments

Comments
 (0)