From 566fa96cca8a12492c64c4fe224d4cf1ffeb2d82 Mon Sep 17 00:00:00 2001 From: Andrew Nelson Date: Tue, 15 Aug 2023 08:00:58 +1000 Subject: [PATCH] MAINT: remove defunc else clause --- scipy/optimize/_dcsrch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scipy/optimize/_dcsrch.py b/scipy/optimize/_dcsrch.py index 5223e33718cf..4931f36c702d 100644 --- a/scipy/optimize/_dcsrch.py +++ b/scipy/optimize/_dcsrch.py @@ -367,8 +367,8 @@ def _iterate(self, stp, f, g, task): task = b"FG" return stp, f, g, task - else: - pass + # in the original Fortran this was a location to restore variables + # we don't need to do that because they're attributes. # If psi(stp) <= 0 and f'(stp) >= 0 for some step, then the # algorithm enters the second stage.