Drop izip compatibility helper

This commit is contained in:
Roman Zeyde
2021-06-19 14:08:13 +03:00
parent 21fe42e68d
commit 9c6ef2884e
3 changed files with 1 additions and 17 deletions

View File

@@ -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. """

View File

@@ -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 = []

View File

@@ -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()