diff --git a/pyerrors/__init__.py b/pyerrors/__init__.py index ca05aff4..cff0cc04 100644 --- a/pyerrors/__init__.py +++ b/pyerrors/__init__.py @@ -394,7 +394,7 @@ Direct visualizations of the performed fits can be triggered via `resplot=True` For all available options including combined fits to multiple datasets see `pyerrors.fits.least_squares`. ## Total least squares fits -`pyerrors` can also fit data with errors on both the dependent and independent variables using the total least squares method also referred to as orthogonal distance regression as implemented in [scipy](https://docs.scipy.org/doc/scipy/reference/odr.html), see `pyerrors.fits.least_squares`. The syntax is identical to the standard least squares case, the only difference being that `x` also has to be a `list` or `numpy.array` of `Obs`. +`pyerrors` can also fit data with errors on both the dependent and independent variables using the total least squares method also referred to as orthogonal distance regression as implemented in [odrpack](https://pypi.org/project/odrpack/), see `pyerrors.fits.total_least_squares`. The syntax is identical to the standard least squares case, the only difference being that `x` also has to be a `list` or `numpy.array` of `Obs`. For the full API see `pyerrors.fits` for fits and `pyerrors.roots` for finding roots of functions. diff --git a/tests/obs_test.py b/tests/obs_test.py index bdeccf82..a6cee885 100644 --- a/tests/obs_test.py +++ b/tests/obs_test.py @@ -511,7 +511,7 @@ def test_merge_obs(): my_obs2 = pe.Obs([np.random.normal(1, .1, 100)], ['t|2'], idl=[range(1, 200, 2)]) merged = pe.merge_obs([my_obs1, my_obs2]) diff = merged - (my_obs2 + my_obs1) / 2 - assert np.isclose(0, diff.value, atol=1e-16) + assert np.isclose(0, diff.value, atol=np.finfo(np.float64).eps) with pytest.raises(ValueError): pe.merge_obs([my_obs1, my_obs1]) my_covobs = pe.cov_Obs(1.0, 0.003, 'cov')