Automatic Differentiation
 
Loading...
Searching...
No Matches
as_array_or_scalar.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_REV_FUN_AS_ARRAY_OR_SCALAR_HPP
2#define STAN_MATH_REV_FUN_AS_ARRAY_OR_SCALAR_HPP
3
7
8namespace stan {
9namespace math {
10
19template <typename T, require_var_matrix_t<T>* = nullptr>
20inline auto as_array_or_scalar(T&& v) {
21 return v.array();
22}
23
24} // namespace math
25} // namespace stan
26
27#endif
T as_array_or_scalar(T &&v)
Returns specified input value.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...