mirror of
https://github.com/romanz/amodem.git
synced 2026-02-06 00:36:20 +08:00
Drop izip compatibility helper
This commit is contained in:
@@ -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. """
|
||||
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user