Skip to content

Commit

Permalink
Merge pull request #101
Browse files Browse the repository at this point in the history
[Bug fix] ldpc_bp_decode
  • Loading branch information
BastienTr authored Feb 19, 2021
2 parents 5dba9a4 + aaedc5f commit 46512b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commpy/channelcoding/ldpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ def ldpc_bp_decode(llr_vec, ldpc_code_params, decoder_algorithm, n_iters):
message_matrix.data *= -1
message_matrix.data += parity_check_matrix.multiply(msg_sum + llr_vec[i_start:i_stop]).data

out_llrs = msg_sum + llr_vec[i_start:i_stop]
np.signbit(out_llrs, out=dec_word[i_start:i_stop])
out_llrs[i_start:i_stop] = msg_sum + llr_vec[i_start:i_stop]
np.signbit(out_llrs[i_start:i_stop], out=dec_word[i_start:i_stop])

# Reformat outputs
n_blocks = llr_vec.size // ldpc_code_params['n_vnodes']
Expand Down

0 comments on commit 46512b9

Please sign in to comment.