Skip to content

Commit

Permalink
Ready for v0.8 pip update
Browse files Browse the repository at this point in the history
  • Loading branch information
BastienTr committed Oct 10, 2022
1 parent c2f6fc9 commit e580696
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions commpy/channelcoding/ldpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,16 @@ def triang_ldpc_systematic_encode(message_bits, ldpc_code_params, pad=True):
Encode bits using the LDPC code specified. If the generator matrix is not computed, this function will build it
and add it to the dictionary. It will also add the parity check matrix.
This function work only for LDPC specified by a triangular parity check matrix.
This function work only for LDPC specified by a approximate triangular parity check matrix.
Parameters
----------
message_bits : 1D-array
Message bit to encode.
ldpc_code_params : dictionary that at least contains one of these options:
Option 1: generator matrix is available.
Option 1: generator matrix and parity-check matrix are available.
parity_check_matrix (CSC sparse matrix of int8) - parity check matrix.
generator_matrix (2D-array or sparse matrix) - generator matrix of the code.
Option 2: generator and parity check matrices will be added as sparse matrices.
n_vnodes (int) - number of variable nodes.
Expand All @@ -337,7 +338,7 @@ def triang_ldpc_systematic_encode(message_bits, ldpc_code_params, pad=True):
If the message length is not a multiple of block length and pad is False.
"""

if ldpc_code_params.get('generator_matrix') is None:
if ldpc_code_params.get('generator_matrix') is None or ldpc_code_params.get('parity_check_matrix') is None:
build_matrix(ldpc_code_params)

block_length = ldpc_code_params['generator_matrix'].shape[1]
Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
# Taken from scikit-learn setup.py
DISTNAME = 'scikit-commpy'
DESCRIPTION = 'Digital Communication Algorithms with Python'
LONG_DESCRIPTION = open('README.md').read()
LONG_DESCRIPTION = open('README.md', encoding="utf8").read()
MAINTAINER = 'Veeresh Taranalli & Bastien Trotobas'
MAINTAINER_EMAIL = 'veeresht@gmail.com'
MAINTAINER_EMAIL = 'bastien.trotobas@gmail.com'
URL = 'http://veeresht.github.com/CommPy'
LICENSE = 'BSD 3-Clause'
VERSION = '0.7.0'
VERSION = '0.8.0'

#This is a list of files to install, and where
#(relative to the 'root' dir, where setup.py is)
Expand Down Expand Up @@ -53,6 +53,7 @@
'Intended Audience :: Science/Research',
'Intended Audience :: Telecommunications Industry',
'Operating System :: Unix',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Topic :: Scientific/Engineering',
'Topic :: Software Development',
Expand Down

0 comments on commit e580696

Please sign in to comment.