mirror of
https://github.com/romanz/amodem.git
synced 2026-04-03 11:06:24 +08:00
config: use '//' for Python 3 (instead of '/')
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user