dsp: stop Demux iteration if samples are over

This commit is contained in:
Roman Zeyde
2014-08-19 17:52:56 +03:00
parent 380302e2c4
commit 30d138dcbc

View File

@@ -121,7 +121,10 @@ class Demux(object):
def next(self):
frame = self.sampler.take(size=Nsym)
return np.dot(self.filters, frame)
if len(frame) == Nsym:
return np.dot(self.filters, frame)
else:
raise StopIteration
__next__ = next