mirror of
https://github.com/romanz/amodem.git
synced 2026-02-08 10:28:00 +08:00
13 lines
235 B
Python
13 lines
235 B
Python
import sampling
|
|
import numpy as np
|
|
|
|
def test_resample():
|
|
x = np.arange(300)
|
|
s = sampling.Sampler(x)
|
|
y = np.array(list(s))
|
|
|
|
k = s.interp.width - 1
|
|
x = x[k:-k-1]
|
|
err = np.max(np.abs(x - y))
|
|
assert err < 1e-10
|