Skip to content

Commit 74a2a37

Browse files
author
Eduardo Soares
committed
Fix issue #76
Unwrapping from tuple back to np.array to be able to call .astype
1 parent bb0fd40 commit 74a2a37

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

commpy/channelcoding/convcode.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,9 @@ def _where_c(inarray, rows, cols, search_value, index_array):
573573

574574

575575
@functools.lru_cache(maxsize=128, typed=False)
576-
def _compute_branch_metrics(decoding_type, r_codeword, i_codeword_array):
576+
def _compute_branch_metrics(decoding_type, _r_codeword: tuple, _i_codeword_array: tuple):
577+
r_codeword = np.array(_r_codeword)
578+
i_codeword_array = np.array(_i_codeword_array)
577579
if decoding_type == 'hard':
578580
return hamming_dist(r_codeword.astype(int), i_codeword_array.astype(int))
579581
elif decoding_type == 'soft':

0 commit comments

Comments
 (0)