Skip to content

Commit

Permalink
Fix failures
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed Aug 7, 2023
1 parent e3451d4 commit 21560cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stan/math/fwd/functor/fvar_finite_diff.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ auto aggregate_tangent(const FuncTangentT& tangent, const InputArgT& arg) {
* @tparam TArgs... Types of arguments (containing at least one fvar<T> type)
* to be passed to function
* @param func Functor for which fvar<T> support is needed
* @param args... Parameter pack of arguments to be passed to functor.
* @param args Parameter pack of arguments to be passed to functor.
*/
template <typename F, typename... TArgs,
require_any_st_fvar<TArgs...>* = nullptr>
Expand Down Expand Up @@ -95,7 +95,7 @@ auto fvar_finite_diff(const F& func, const TArgs&... args) {
(void)std::initializer_list<int>{(
rtn_grad += internal::aggregate_tangent(ds_grad.read(args), args), 0)...};

return fvar<FvarInnerT>(rtn_value, rtn_grad);
return FvarT(rtn_value, rtn_grad);
}

/**
Expand Down

0 comments on commit 21560cf

Please sign in to comment.