summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2017-06-22 16:41:01 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2017-06-22 16:41:01 -0700
commit1cb458583e142b67843645fe8346c9ce47c68398 (patch)
treef6b9f04394f2adb0c065785a9fffa52e0b505bf7
parent297a5974d2625351cf9b1c2f804e5568482704b9 (diff)
parentdab1b01a2cbdfc8a27437129f681d0f2dbda0c36 (diff)
Merge remote-tracking branch 'github/pr/1335' into maint
-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)