improved string representation when finding list of arrays

This commit is contained in:
marco cammarata 2017-03-11 11:26:38 +01:00
parent ce3780e74a
commit 83b1de873c
1 changed files with 1 additions and 1 deletions

View File

@ -239,7 +239,7 @@ class DataStorage(dict):
for k in keys:
if k[0] == "_": continue
obj = self[k]
if isinstance(obj,(list,tuple,np.ndarray)) and all( [isinstance(v,np.ndarray) for v in obj]):
if isinstance(obj,(list,tuple,np.ndarray)) and all( [isinstance(v,np.ndarray) for v in obj]) and obj.ndim == 1:
value_str = "list of arrays, shapes " + ",".join([str(v.shape) for v in obj[:5]]) + " ..."
elif isinstance(obj,np.ndarray):
value_str = "array, size %s, type %s"% ("x".join(map(str,obj.shape)),obj.dtype)