From a178851b369e303242749b60badaef697480375a Mon Sep 17 00:00:00 2001 From: Muhammed Ali Toprak Date: Wed, 6 Nov 2024 20:39:27 +0300 Subject: [PATCH] Fix overflow issue in naturalsize with np.int32 input --- src/humanize/filesize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/humanize/filesize.py b/src/humanize/filesize.py index 9bb1a62..560754c 100644 --- a/src/humanize/filesize.py +++ b/src/humanize/filesize.py @@ -101,5 +101,5 @@ def naturalsize( if abs_bytes < unit: break - ret: str = format % (base * bytes_ / unit) + s + ret: str = format % (base * (bytes_ / unit)) + s return ret