short_format: cover a few more numpy types correctly

This commit is contained in:
Robert Jördens 2016-05-21 20:11:08 +02:00
parent 9e681590cb
commit 0857cfdcb1
1 changed files with 2 additions and 2 deletions

View File

@ -58,9 +58,9 @@ def short_format(v):
if v is None:
return "None"
t = type(v)
if t is bool or np.issubdtype(t, int) or np.issubdtype(t, float):
if np.issubdtype(t, np.number) or np.issubdtype(t, np.bool_):
return str(v)
elif t is str:
elif np.issubdtype(t, np.unicode_):
return "\"" + elide(v, 50) + "\""
else:
r = t.__name__