mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 11:33:42 +02:00
refactor: unnecessary keywords for call to numdifftools removed, test
against numerical differentiation made stricter.
This commit is contained in:
parent
a97d0c31a6
commit
6971e8cd9b
2 changed files with 2 additions and 9 deletions
|
@ -304,7 +304,7 @@ def test_derived_observables():
|
|||
d_Obs_fd = pe.derived_observable(lambda x, **kwargs: x[0] * x[1] * np.sin(x[0] * x[1]), [test_obs, test_obs], num_grad=True)
|
||||
d_Obs_fd.gamma_method()
|
||||
|
||||
assert d_Obs_ad.value == d_Obs_fd.value
|
||||
assert d_Obs_ad == d_Obs_fd
|
||||
assert np.abs(4.0 * np.sin(4.0) - d_Obs_ad.value) < 1000 * np.finfo(np.float64).eps * np.abs(d_Obs_ad.value)
|
||||
assert np.abs(d_Obs_ad.dvalue-d_Obs_fd.dvalue) < 1000 * np.finfo(np.float64).eps * d_Obs_ad.dvalue
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue