2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-26 03:38:25 +08:00

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

View File

@ -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