mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 19:28:26 +08:00
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
Block a user