diff --git a/amodem/common.py b/amodem/common.py index e0e6630..0aba546 100644 --- a/amodem/common.py +++ b/amodem/common.py @@ -73,16 +73,6 @@ def take(iterable, n): return np.array(list(itertools.islice(iterable, n))) -def izip(iterables): - """ "Python 3" zip re-implementation for Python 2. """ - iterables = [iter(iterable) for iterable in iterables] - try: - while True: - yield tuple([next(iterable) for iterable in iterables]) - except StopIteration: - pass - - class Dummy: """ Dummy placeholder object for testing and mocking. """ diff --git a/amodem/recv.py b/amodem/recv.py index 0b1259d..84f21f0 100644 --- a/amodem/recv.py +++ b/amodem/recv.py @@ -111,7 +111,7 @@ class Receiver: bits = self.modem.decode(S, freq_handler) # list of bit tuples streams.append(bits) # bit stream per frequency - return common.izip(streams), symbol_list + return zip(*streams), symbol_list def _demodulate(self, sampler, symbols): symbol_list = [] diff --git a/amodem/tests/test_common.py b/amodem/tests/test_common.py index bceb85a..34745e2 100644 --- a/amodem/tests/test_common.py +++ b/amodem/tests/test_common.py @@ -48,12 +48,6 @@ def test_dumps_loads(): assert all(x == y) -def test_izip(): - x = range(10) - y = range(-10, 0) - assert list(common.izip([x, y])) == list(zip(x, y)) - - def test_configs(): default = config.Configuration() fastest = config.fastest()