Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convcode.py throws a TypeError when running if installed numpy version is 1.12 or greater #17

Closed
threexc opened this issue Mar 6, 2018 · 1 comment
Assignees

Comments

@threexc
Copy link

threexc commented Mar 6, 2018

Appears that as of 1.12, numpy float64s can no longer be used as indices. This was encountered on a system with Python 2.7.14 and numpy 1.13.3:

  File "/usr/lib/python2.7/site-packages/commpy/channelcoding/convcode.py", line 337, in conv_encode
    puncture_matrix[0:].sum()/np.size(puncture_matrix, 1), 'int')
TypeError: 'numpy.float64' object cannot be interpreted as an index

Rolling back to 1.11.0 shows a warning:

/usr/lib/python2.7/site-packages/commpy/channelcoding/convcode.py:337: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  puncture_matrix[0:].sum()/np.size(puncture_matrix, 1), 'int')
/home/threexc/Projects/Recorder/T9_FrameGenerator/make_symbol.py:1047: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  (_,curr_data_time,_,_) = make_symbol(scr_coded[i*ncbps:(i+1)*ncbps],rate_dict[rate][1],i+1)
@BastienTr BastienTr self-assigned this Jun 5, 2019
@BastienTr BastienTr reopened this Jun 13, 2019
@BastienTr
Copy link
Collaborator

I can't reproduce this problem with the unit test under python 2 nor under 3 and the latest version of numpy. I close but don't hesitate to reopen with a code showing the error so that I can have a closer look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants