From 734143b7ac8254dea44ea84ba823cf7b629d527c Mon Sep 17 00:00:00 2001 From: Zhihan Yue Date: Fri, 17 Feb 2023 14:27:58 +0800 Subject: [PATCH] Update _isnumber --- tabulate/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tabulate/__init__.py b/tabulate/__init__.py index 3b1a1e11..afbd46a3 100644 --- a/tabulate/__init__.py +++ b/tabulate/__init__.py @@ -850,7 +850,7 @@ def _isnumber(string): >>> _isnumber("inf") True """ - if not _isconvertible(float, string): + if not _isconvertible(float, str(string)): return False elif isinstance(string, (str, bytes)) and ( math.isinf(float(string)) or math.isnan(float(string))