scipy.optimize.fsolve Jacobian argument incomplete in the documentation #7126
Labels
Documentation
Issues related to the SciPy documentation. Also check https://github.com/scipy/scipy.org
scipy.optimize
This seems to be a minor documentation bug & an easy fix
The scipy.optimize.fsolve accepts a jacobian in the fprime argument
scipy.optimize.fsolve(func, x0, args=(), fprime=None, full_output=0, col_deriv=0, xtol=1.49012e-08, maxfev=0, band=None, epsfcn=None, factor=100, diag=None)
fprime is defined as
fprime : callable(x), optional A function to compute the Jacobian of
funcwith derivatives across the rows. By default, the Jacobian will be estimated.
I believe it should really be
fprime : callable(x, *args), optional A function to compute the Jacobian of
funcwith derivatives across the rows. By default, the Jacobian will be estimated.
The args from fsolve are passed down to the jacobian. This can be confirmed from the code in scipy/optimize/minpack.py, _root_hybr (code snippet below - the last line is where there is check to see if the jacobian accepts x0 & args)
` Dfun = jac
`
The text was updated successfully, but these errors were encountered: