FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix overflow issue in `naturalsize` with `np.int32` input by Toprak2 · Pull Request #218 · python-humanize/humanize · GitHub

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

Merged
hugovk merged 1 commit into
python-humanize:mainfrom
Toprak2:fix-naturalsize-overflow
Nov 6, 2024
Merged

Fix overflow issue in naturalsize with np.int32 input#218
hugovk merged 1 commit into
python-humanize:mainfrom
Toprak2:fix-naturalsize-overflow

Conversation

Toprak2 commented Nov 6, 2024

Copy link
Copy Markdown
Contributor

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 added the changelog: Fixed For any bug fixes label Nov 6, 2024
hugovk merged commit 6a70582 into python-humanize:main Nov 6, 2024

hugovk commented Nov 6, 2024

Copy link
Copy Markdown
Member

Thank you!

Toprak2 deleted the fix-naturalsize-overflow branch November 7, 2024 06:49
hugovk changed the title Fix overflow issue in naturalsize with np.int32 input Fix overflow issue in naturalsize with np.int32 input Feb 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL