veeresht / CommPy

Digital Communication with Python
http://veeresht.github.com/CommPy
BSD 3-Clause "New" or "Revised" License
538 stars 176 forks source link

[Bug fix] ldpc_bp_decode #101

Closed euhwandy closed 3 years ago

euhwandy commented 3 years ago

out_llrs array was being overwritten by the output LLR values of a single block. Not only does this cause the returned out_llrs array to be incorrect, it may sometimes cause an error to be thrown. This occurs because the reshape at line 253 expects the out_llrs to contain LLR values for n_blocks different blocks, but it only contains the LLR values for a single block.

This has been fixed by writing the output LLRs of each block to their corresponding position within the out_llrs array.

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 82.799% when pulling aaedc5f99fd075209ae21781e0d0f415c356a28e on euhwandy:fix-ldpc-bp-decode into 5dba9a496835313fec7076407daddcbc702dfa09 on veeresht:master.

BastienTr commented 3 years ago

You are right! Thank you very much for pointing out the issue and for proposing a fix :+1: