dolfin-adjoint / pyadjoint

The algorithmic differentation tool pyadjoint and add-ons.
GNU Lesser General Public License v3.0
90 stars 35 forks source link

`minimize_scipy_generic` does not check for success #166

Open jrmaddison opened 1 month ago

jrmaddison commented 1 month ago

The "x" element (the solution) is accessed, but the rest of the OptimizeResult is discarded, without checking "success".

See https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.OptimizeResult.html#scipy.optimize.OptimizeResult.