diff options
author | Mario Mulansky <mario.mulansky@gmx.net> | 2015-05-13 18:19:02 +0200 |
---|---|---|
committer | Mario Mulansky <mario.mulansky@gmx.net> | 2015-05-13 18:19:02 +0200 |
commit | 8841138b74242ed9eb77c972c76e9a617778a79a (patch) | |
tree | 17dfc3f732af4af7b3f0f119197e05a36baa5d70 /test | |
parent | f3e21dcc82d48f0980b0107f1e5cf320a8b213f3 (diff) |
pwc function now returns intermediate value at exact spike times
Diffstat (limited to 'test')
-rw-r--r-- | test/test_function.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test_function.py b/test/test_function.py index c56a295..8ad4b17 100644 --- a/test/test_function.py +++ b/test/test_function.py @@ -25,12 +25,14 @@ def test_pwc(): # function values assert_equal(f(0.0), 1.0) assert_equal(f(0.5), 1.0) + assert_equal(f(1.0), 0.25) assert_equal(f(2.25), 1.5) + assert_equal(f(2.5), 2.25/2) assert_equal(f(3.5), 0.75) assert_equal(f(4.0), 0.75) - assert_array_equal(f([0.0, 0.5, 2.25, 3.5, 4.0]), - [1.0, 1.0, 1.5, 0.75, 0.75]) + assert_array_equal(f([0.0, 0.5, 1.0, 2.25, 2.5, 3.5, 4.0]), + [1.0, 1.0, 0.25, 1.5, 2.25/2, 0.75, 0.75]) xp, yp = f.get_plottable_data() |