odr_fit renamed, deprecation warning added

least_squares and total_least_squares are now available to the top level
namespace
This commit is contained in:
Fabian Joswig 2021-11-01 12:01:46 +00:00
parent 1013307e24
commit 0e8fc7d36a
3 changed files with 11 additions and 5 deletions

View file

@ -214,6 +214,11 @@ def standard_fit(x, y, func, silent=False, **kwargs):
def odr_fit(x, y, func, silent=False, **kwargs):
warnings.warn("odr_fit renamed to total_least_squares", DeprecationWarning)
return total_least_squares(x, y, func, silent=silent, **kwargs)
def total_least_squares(x, y, func, silent=False, **kwargs):
"""Performs a non-linear fit to y = func(x) and returns a list of Obs corresponding to the fit parameters.
x has to be a list of Obs, or a tuple of lists of Obs