mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
fix: corrected bug that prevented combined fits with multiple x-obs in some cases (#241)
* fix: corrected bug that prevented combined fits with multiple x-obs in some cases * made test more complex * [Fix] Slightly increase tolerance for matrix function test. * Adapt test_merge_idx to compare lists --------- Co-authored-by: Simon Kuberski <simon.kuberski@cern.ch> Co-authored-by: Fabian Joswig <fjosw@users.noreply.github.com>
This commit is contained in:
parent
1d6f7f65c0
commit
4b1bb0872a
4 changed files with 21 additions and 7 deletions
|
@ -554,11 +554,11 @@ def test_merge_idx():
|
|||
|
||||
for j in range(5):
|
||||
idll = [range(1, int(round(np.random.uniform(300, 700))), int(round(np.random.uniform(1, 14)))) for i in range(10)]
|
||||
assert pe.obs._merge_idx(idll) == sorted(set().union(*idll))
|
||||
assert list(pe.obs._merge_idx(idll)) == sorted(set().union(*idll))
|
||||
|
||||
for j in range(5):
|
||||
idll = [range(int(round(np.random.uniform(1, 28))), int(round(np.random.uniform(300, 700))), int(round(np.random.uniform(1, 14)))) for i in range(10)]
|
||||
assert pe.obs._merge_idx(idll) == sorted(set().union(*idll))
|
||||
assert list(pe.obs._merge_idx(idll)) == sorted(set().union(*idll))
|
||||
|
||||
idl = [list(np.arange(1, 14)) + list(range(16, 100, 4)), range(4, 604, 4), [2, 4, 5, 6, 8, 9, 12, 24], range(1, 20, 1), range(50, 789, 7)]
|
||||
new_idx = pe.obs._merge_idx(idl)
|
||||
|
@ -1457,4 +1457,4 @@ def test_missing_replica():
|
|||
|
||||
for op in [[O1O2, O1O2b], [O1O2O3, O1O2O3b]]:
|
||||
assert np.isclose(op[1].value, op[0].value)
|
||||
assert np.isclose(op[1].dvalue, op[0].dvalue, atol=0, rtol=5e-2)
|
||||
assert np.isclose(op[1].dvalue, op[0].dvalue, atol=0, rtol=5e-2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue