mirror of https://github.com/m-labs/artiq.git
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__
|
||||
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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue