Skip to content

Commit

Permalink
Use 1D array in scipy.optimize.minimize
Browse files Browse the repository at this point in the history
  • Loading branch information
JulioAPeraza committed Aug 9, 2022
1 parent 19af399 commit d2a999b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymare/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def q_profile(y, v, X, alpha=0.05):
ub_start = 2 * DerSimonianLaird().fit(y, v, X).params_["tau2"]

lb = minimize(lambda x: (q_gen(*args, x) - l_crit) ** 2, [0], bounds=bds).x[0]
ub = minimize(lambda x: (q_gen(*args, x) - u_crit) ** 2, [ub_start], bounds=bds).x[0]
ub = minimize(lambda x: (q_gen(*args, x) - u_crit) ** 2, ub_start, bounds=bds).x[0]
return {"ci_l": lb, "ci_u": ub}


Expand Down

0 comments on commit d2a999b

Please sign in to comment.