tools/short_format: display shape of ndarrays

This commit is contained in:
Sebastien Bourdeauducq 2015-10-21 11:13:46 +08:00
parent a58e41684b
commit 50809e02c2
1 changed files with 2 additions and 0 deletions

View File

@ -57,6 +57,8 @@ def short_format(v):
r = t.__name__
if t is list or t is dict or t is set:
r += " ({})".format(len(v))
if t is np.ndarray:
r += " " + str(np.shape(v))
return r