Skip to content

Commit 9d3be49

Browse files
authored
Merge pull request scipy#23787 from ilayn/slsqp_pyhf_report
BUG:optimize:SLSQP: Use double negative in an if condition for NaN handling
2 parents db7b5ee + 76f47cd commit 9d3be49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scipy/optimize/__slsqp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ __slsqp_body(
240240
}
241241
S->h1 = S->t - S->t0;
242242

243-
if ((S->h1 > (S->h3 / 10.0)) && (S->line <= 10))
243+
if (!((S->h1 <= (S->h3 / 10.0)) || (S->line > 10)))
244244
{
245245
S->alpha = fmax(S->h3/(2.0*(S->h3 - S->h1)), alfmin);
246246
goto LINE_SEARCH;

0 commit comments

Comments
 (0)