mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
fix: root module now also works with irregular monte carlo chains
This commit is contained in:
parent
f808c2243e
commit
b2a249302a
2 changed files with 16 additions and 2 deletions
|
@ -17,3 +17,15 @@ def test_root_linear():
|
|||
assert np.isclose(my_root.value, value)
|
||||
difference = my_obs - my_root
|
||||
assert difference.is_zero()
|
||||
|
||||
|
||||
def test_root_linear_idl():
|
||||
|
||||
def root_function(x, d):
|
||||
return x - d
|
||||
|
||||
my_obs = pe.Obs([np.random.rand(50)], ['t'], idl=[range(20, 120, 2)])
|
||||
my_root = pe.roots.find_root(my_obs, root_function)
|
||||
|
||||
difference = my_obs - my_root
|
||||
assert difference.is_zero()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue