Skip to content

Commit

Permalink
Updated test
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximilian Maahn committed Oct 3, 2019
1 parent a24f7e0 commit 52debe2
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions pyOptimalEstimation/tests/test_pyoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,13 @@ def test_simple(self):
oe.nonlinearity, np.array([0.01916289, 0.04508785, 0.02804108])
)
)
assert np.isclose(oe.chi2, 56.31308272127505)

assert np.all(
np.isclose(
oe.chi2Results['chi2value'] ,
np.array([67.748733, 41.148962, 2.908089, 0.176378])
)
)

def test_simple_withB(self):
x_vars = ['N', 'R']
b_vars = ['W']
Expand Down Expand Up @@ -144,7 +149,12 @@ def test_simple_withB(self):
)
)
assert np.isclose(oe.dgf, 1.9612330067312422)
assert np.isclose(oe.chi2, 79.66710659064536)
assert np.all(
np.isclose(
oe.chi2Results['chi2value'] ,
np.array([47.36895951, 32.34974831, 0.21562209, 0.0769669 ])
)
)
assert np.isclose(oe.trueNonlinearity, 0.04230584990874298)
assert np.all(
np.isclose(
Expand Down

0 comments on commit 52debe2

Please sign in to comment.