common.loads() should return time only if asked to

This commit is contained in:
Roman Zeyde
2014-07-21 13:29:27 +03:00
parent 5d71431c7c
commit 3ccf4ff188
5 changed files with 15 additions and 10 deletions

View File

@@ -25,7 +25,7 @@ def recv():
data = out.read(len(sig_dump))
if len(data) < len(sig_dump):
return
_, x = common.loads(data)
x = common.loads(data)
x = x - np.mean(x)
c = np.abs(np.dot(x, sig)) / (np.sqrt(0.5 * len(x)) * sigproc.norm(x))