44#include < stan/math/prim/meta.hpp>
55#include < stan/math/prim/err/check_not_nan.hpp>
66#include < stan/math/prim/err/check_finite.hpp>
7+ #include < stan/math/prim/fun/to_row_vector.hpp>
78#include < boost/math/special_functions/hypergeometric_pFq.hpp>
89
910namespace stan {
@@ -14,10 +15,6 @@ namespace math {
1415 * input arguments:
1516 * \f$_pF_q(a_1,...,a_p;b_1,...,b_q;z)\f$
1617 *
17- * This function is not intended to be exposed to end users, only
18- * used for p & q values that are stable with the grad_pFq
19- * implementation.
20- *
2118 * See 'grad_pFq.hpp' for the derivatives wrt each parameter
2219 *
2320 * @param[in] a Vector of 'a' arguments to function
@@ -26,7 +23,7 @@ namespace math {
2623 * @return Generalized hypergeometric function
2724 */
2825template <typename Ta, typename Tb, typename Tz,
29- require_all_eigen_st <std::is_arithmetic, Ta, Tb>* = nullptr ,
26+ require_all_vector_st <std::is_arithmetic, Ta, Tb>* = nullptr ,
3027 require_arithmetic_t <Tz>* = nullptr >
3128return_type_t <Ta, Tb, Tz> hypergeometric_pFq (const Ta& a, const Tb& b,
3229 const Tz& z) {
@@ -47,8 +44,9 @@ return_type_t<Ta, Tb, Tz> hypergeometric_pFq(const Ta& a, const Tb& b,
4744 std::stringstream msg;
4845 msg << " hypergeometric function pFq does not meet convergence "
4946 << " conditions with given arguments. "
50- << " a: " << a_ref << " , b: " << b_ref << " , "
51- << " , z: " << z;
47+ << " a: " << to_row_vector (a_ref) << " , "
48+ << " b: " << to_row_vector (b_ref) << " , "
49+ << " z: " << z;
5250 throw std::domain_error (msg.str ());
5351 }
5452
0 commit comments