Skip to content

Commit c88bf47

Browse files
committed
modulation: make self.constellation a list
arraying a map doesn't seem to evaluate it, and leaves us with an unindexable object. listing evaluates it and is indexable.
1 parent 152346a commit c88bf47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

commpy/modulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def __init__(self, m):
113113
self.m = m
114114
self.num_bits_symbol = int(log2(self.m))
115115
self.symbol_mapping = arange(self.m)
116-
self.constellation = array(map(self._constellation_symbol,
116+
self.constellation = list(map(self._constellation_symbol,
117117
self.symbol_mapping))
118118

119119
class QAMModem(Modem):
@@ -136,7 +136,7 @@ def __init__(self, m):
136136
self.num_bits_symbol = int(log2(self.m))
137137
self.symbol_mapping = arange(self.m)
138138
mapping_array = arange(1, sqrt(self.m)+1) - (sqrt(self.m)/2)
139-
self.constellation = array(map(self._constellation_symbol,
139+
self.constellation = list(map(self._constellation_symbol,
140140
list(product(mapping_array, repeat=2))))
141141

142142
def ofdm_tx(x, nfft, nsc, cp_length):

0 commit comments

Comments
 (0)