mirror of
https://github.com/fjosw/pyerrors.git
synced 2026-05-13 16:46:52 +02:00
[Fix] Migrate to odrpack because of scipy.odr deprecation (#279)
* [Fix] Migrate to odrpack because of scipy.odr deprecation in recent release * [Fix] Fix behaviour for rank deficient fits. Add test * [Fix] Relax test_merge_obs tolerance to machine epsilon and update ODR docstring to reference odrpack * [ci] Re-add -Werror to pytest workflow * [Fix] Handle platform-dependent rank-deficient warning in ODR tests * [Fix] Improve rank-deficient detection and bump odrpack to >=0.5 Fix incorrect ODRPACK95 info code parsing: rank deficiency is encoded in the tens digit (info // 10 % 10), not the hundreds digit. Add irank and inv_condnum to the warning message for diagnostics.
This commit is contained in:
parent
b180dff020
commit
b28c2f0b6f
6 changed files with 119 additions and 44 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue