Skip to content

Commit 47c4f9a

Browse files
committed
Fix broadcast logic
1 parent cabafd6 commit 47c4f9a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

stan/math/prim/prob/bernoulli_lccdf.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ return_type_t<T_prob> bernoulli_lccdf(const T_n& n, const T_prob& theta) {
5555

5656
size_t theta_size = math::size(theta_arr);
5757
size_t n_size = math::size(n_arr);
58-
double broadcast_n = theta_size == n_size ? 1 : std::fmax(theta_size, n_size);
58+
double broadcast_n = theta_size == n_size ? 1 : n_size;
5959

6060
if (!is_constant_all<T_prob>::value) {
6161
partials<0>(ops_partials) = inv(theta_arr) * broadcast_n;

0 commit comments

Comments
 (0)