We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e138b71 commit 522a34fCopy full SHA for 522a34f
src/stan/mcmc/hmc/base_hmc.hpp
@@ -81,6 +81,12 @@ class base_hmc : public base_mcmc {
81
void init_stepsize(callbacks::logger& logger) {
82
ps_point z_init(this->z_);
83
84
+ // step size is meaningless in zero-dimensional space
85
+ if (this->z_.q.size() == 0) {
86
+ this->nom_epsilon_ = std::numeric_limits<double>::quiet_NaN();
87
+ return;
88
+ }
89
+
90
// Skip initialization for extreme step sizes
91
if (this->nom_epsilon_ == 0 || this->nom_epsilon_ > 1e7
92
|| std::isnan(this->nom_epsilon_))
0 commit comments