Skip to content

Commit

Permalink
Merge pull request #2954 from stan-dev/fix-bernoulli-dist-tests
Browse files Browse the repository at this point in the history
Fix Row-Vector Distribution test failures
  • Loading branch information
andrjohns authored Oct 1, 2023
2 parents 598dba7 + 0047f43 commit 42bc0c1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stan/math/prim/prob/bernoulli_cdf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ return_type_t<T_prob> bernoulli_cdf(const T_n& n, const T_prob& theta) {
check_consistent_sizes(function, "Random variable", n,
"Probability parameter", theta);
T_theta_ref theta_ref = theta;
const auto& n_arr = as_array_or_scalar(n);
const auto& n_arr = as_value_column_array_or_scalar(n);
const auto& theta_arr = as_value_column_array_or_scalar(theta_ref);
check_bounded(function, "Probability parameter", theta_arr, 0.0, 1.0);

Expand Down
2 changes: 1 addition & 1 deletion stan/math/prim/prob/bernoulli_lccdf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ return_type_t<T_prob> bernoulli_lccdf(const T_n& n, const T_prob& theta) {
check_consistent_sizes(function, "Random variable", n,
"Probability parameter", theta);
T_theta_ref theta_ref = theta;
const auto& n_arr = as_array_or_scalar(n);
const auto& n_arr = as_value_column_array_or_scalar(n);
const auto& theta_arr = as_value_column_array_or_scalar(theta_ref);
check_bounded(function, "Probability parameter", theta_arr, 0.0, 1.0);

Expand Down
2 changes: 1 addition & 1 deletion stan/math/prim/prob/bernoulli_lcdf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ return_type_t<T_prob> bernoulli_lcdf(const T_n& n, const T_prob& theta) {
check_consistent_sizes(function, "Random variable", n,
"Probability parameter", theta);
T_theta_ref theta_ref = theta;
const auto& n_arr = as_array_or_scalar(n);
const auto& n_arr = as_value_column_array_or_scalar(n);
const auto& theta_arr = as_value_column_array_or_scalar(theta_ref);
check_bounded(function, "Probability parameter", theta_arr, 0.0, 1.0);

Expand Down

0 comments on commit 42bc0c1

Please sign in to comment.