diff options
author | Mario Mulansky <mario.mulansky@gmx.net> | 2014-10-22 18:30:17 +0200 |
---|---|---|
committer | Mario Mulansky <mario.mulansky@gmx.net> | 2014-10-22 18:30:17 +0200 |
commit | 7dbb5f87321fc89b6c84552cfd821f96fe364bbe (patch) | |
tree | ce005c8a3e855e587061a063dc9124ec9103fb9a /test/test_function.py | |
parent | 1b0421a207f5a1eb43b12bb18d5e783e753b739e (diff) |
pwc avrg now takes interval
Diffstat (limited to 'test/test_function.py')
-rw-r--r-- | test/test_function.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_function.py b/test/test_function.py index c856d76..cabcf44 100644 --- a/test/test_function.py +++ b/test/test_function.py @@ -29,6 +29,11 @@ def test_pwc(): assert_almost_equal(f.avrg(), (1.0-0.5+0.5*1.5+1.5*0.75)/4.0, decimal=16) + # interval averaging + a = f.avrg([0.5, 3.5]) + print(a) + assert_almost_equal(a, (0.5-0.5+0.5*1.5+1.0*0.75)/3.0, decimal=16) + def test_pwc_add(): # some random data |