optimize sampler to apply demuxing at symbols rate

This commit is contained in:
Roman Zeyde
2014-08-09 11:03:13 +03:00
parent 5717bfa071
commit 355b5eca44
3 changed files with 19 additions and 19 deletions

View File

@@ -4,8 +4,8 @@ import numpy as np
def test_resample():
x = np.arange(300)
s = sampling.Sampler(x)
y = np.array(list(s))
s = sampling.Sampler(x, interp=sampling.Interpolator())
y = s.take(len(x) - s.interp.width - 1)
err = x[1:len(y)+1] - y
assert np.max(np.abs(err)) < 1e-10