config: use '//' for Python 3 (instead of '/')

This commit is contained in:
Roman Zeyde
2017-11-01 13:09:32 +02:00
committed by Roman Zeyde
parent 6629cb6762
commit ceaf893675
2 changed files with 7 additions and 1 deletions

View File

@@ -51,7 +51,7 @@ class Configuration(object):
])
# QAM constellation
Nx = 2 ** int(np.ceil(bits_per_symbol / 2))
Nx = 2 ** int(np.ceil(bits_per_symbol // 2))
Ny = self.Npoints // Nx
symbols = [complex(x, y) for x in range(Nx) for y in range(Ny)]
symbols = np.array(symbols)

View File

@@ -4,3 +4,9 @@ from amodem import config
def test_bitrates():
for rate, cfg in sorted(config.bitrates.items()):
assert rate * 1000 == cfg.modem_bps
def test_slowest():
c = config.slowest()
assert c.Npoints == 2
assert list(c.symbols) == [-1j, 1j]