Skip to content

Commit 5aaab4d

Browse files
committed
update bernoulli casting
1 parent ee49c01 commit 5aaab4d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stan/math/prim/prob/bernoulli_logit_lpmf.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ inline return_type_t<T_prob> bernoulli_logit_lpmf(const T_n& n,
8282
= (ntheta > cutoff)
8383
.select(-exp_m_ntheta,
8484
(ntheta >= -cutoff)
85-
.select(signs * exp_m_ntheta / (exp_m_ntheta + 1),
86-
T_partials_array(signs)));
85+
.select(promote_scalar<T_partials_return>(
86+
signs * exp_m_ntheta / (exp_m_ntheta + 1)),
87+
promote_scalar<T_partials_return>(signs)));
8788
}
8889
return ops_partials.build(logp);
8990
}

0 commit comments

Comments
 (0)