From 7dbb5f87321fc89b6c84552cfd821f96fe364bbe Mon Sep 17 00:00:00 2001 From: Mario Mulansky Date: Wed, 22 Oct 2014 18:30:17 +0200 Subject: pwc avrg now takes interval --- test/test_function.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') 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 -- cgit v1.2.3