forked from M-Labs/artiq
tools/short_format: display shape of ndarrays
This commit is contained in:
parent
a58e41684b
commit
50809e02c2
|
@ -57,6 +57,8 @@ def short_format(v):
|
||||||
r = t.__name__
|
r = t.__name__
|
||||||
if t is list or t is dict or t is set:
|
if t is list or t is dict or t is set:
|
||||||
r += " ({})".format(len(v))
|
r += " ({})".format(len(v))
|
||||||
|
if t is np.ndarray:
|
||||||
|
r += " " + str(np.shape(v))
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue