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

Fix overflow issue in naturalsize with np.int32 input #218

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

Toprak2
Copy link
Contributor

@Toprak2 Toprak2 commented Nov 6, 2024

Fixes #217

Changes proposed in this pull request:

  • Change the order of operations of the return statement in the naturalsize function to ensure all intermediate calculations stay float to prevent overflow issues.

@hugovk hugovk added the changelog: Fixed For any bug fixes label Nov 6, 2024
@hugovk hugovk merged commit 6a70582 into python-humanize:main Nov 6, 2024
30 checks passed
@hugovk
Copy link
Member

hugovk commented Nov 6, 2024

Thank you!

@Toprak2 Toprak2 deleted the fix-naturalsize-overflow branch November 7, 2024 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: Fixed For any bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

naturalsize np.int32 multiplication overflow
2 participants