veeresht / CommPy

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

Warning messages in tests #93

Open londumas opened 3 years ago

londumas commented 3 years ago

Unittests features few warning messages, it would be good to fix them.

<me>/CommPy$ python commpy/tests/test_*
...<me>/CommPy/commpy/links.py:324: ComplexWarning: Casting complex values to real discards the imaginary part
  received_msg[receive_size * i:receive_size * (i + 1)] = \
.<me>/CommPy/commpy/modulation.py:633: RuntimeWarning: divide by zero encountered in true_divide
  return -LLR / (2 * noise_var)
.................................................<me>/CommPy/commpy/channels.py:239: RuntimeWarning: divide by zero encountered in long_scalars
  return absolute(self.fading_param[0]) ** 2 / absolute(self.fading_param[1])
<me>/CommPy/commpy/channels.py:239: RuntimeWarning: divide by zero encountered in double_scalars
  return absolute(self.fading_param[0]) ** 2 / absolute(self.fading_param[1])
...
----------------------------------------------------------------------
Ran 56 tests in 257.543s

OK
adeeb10abbas commented 3 years ago

Can you provide more information about your setup? What versions of things are you using?