Skip to content

Commit 99e4d5d

Browse files
committed
fix warning on float32 numpy arrays in Python 2
1 parent ddbb64a commit 99e4d5d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tabulate.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,10 @@ def _isbool(string):
381381
>>> _isbool(1)
382382
False
383383
"""
384-
return type(string) is _bool_type or string in ("True", "False")
384+
return type(string) is _bool_type or\
385+
(isinstance(string, (_binary_type, _text_type))\
386+
and\
387+
string in ("True", "False"))
385388

386389

387390
def _type(string, has_invisible=True):

0 commit comments

Comments
 (0)