summaryrefslogtreecommitdiff
path: root/gr-fec/python
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2017-06-22 17:01:54 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2017-06-22 17:01:54 -0700
commit1d537a26b27b9d3ce6a3affc6ea500a9efc5a867 (patch)
treef4cd3b2ccb49a7ec76ee3197f14f30907fb49a71 /gr-fec/python
parentc1f706fb1bec6a68191d44498c70d17226bd4ea7 (diff)
parentd8b3e478fed02053d06ad41037db1f9c9728c3b5 (diff)
Merge branch 'master' into next
Diffstat (limited to 'gr-fec/python')
-rw-r--r--gr-fec/python/fec/polar/channel_construction.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gr-fec/python/fec/polar/channel_construction.py b/gr-fec/python/fec/polar/channel_construction.py
index a981007b45..b7a3dee3bd 100644
--- a/gr-fec/python/fec/polar/channel_construction.py
+++ b/gr-fec/python/fec/polar/channel_construction.py
@@ -37,7 +37,7 @@ Z_PARAM_FIRST_HEADER_LINE = "Bhattacharyya parameters (Z-parameters) for a polar
def get_frozen_bit_indices_from_capacities(chan_caps, nfrozen):
indexes = np.array([], dtype=int)
while indexes.size < nfrozen:
- index = np.argmin(chan_caps)
+ index = np.argmin(chan_caps).astype(int)
indexes = np.append(indexes, index)
chan_caps[index] = 2.0 # make absolutely sure value is out of range!
return np.sort(indexes)
@@ -46,7 +46,7 @@ def get_frozen_bit_indices_from_capacities(chan_caps, nfrozen):
def get_frozen_bit_indices_from_z_parameters(z_params, nfrozen):
indexes = np.array([], dtype=int)
while indexes.size < nfrozen:
- index = np.argmax(z_params)
+ index = np.argmax(z_params).astype(int)
indexes = np.append(indexes, index)
z_params[index] = -1.0
return np.sort(indexes)