Skip to content

Fix overflow when encoding non-python data types #117

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AuthoStats
Copy link

See Issue#116 for an example of the issue.

Added a UnitTest that fails without the fix. UnitTest requires Numpy to work, as Numpy has data types such as int64 that cause overflow because the int_rep conversion doesn't properly convert into a python int, which is needed to prevent overflow in the modulus operation.

One Working fix is to just convert the int_rep into a python int manually by wrapping it in the int() function.

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

Successfully merging this pull request may close these issues.

1 participant