From 83b1de873cdac9ffe73bac03ecce74fe97bebe84 Mon Sep 17 00:00:00 2001 From: marco cammarata Date: Sat, 11 Mar 2017 11:26:38 +0100 Subject: [PATCH] improved string representation when finding list of arrays --- storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage.py b/storage.py index 1e632fc..81968a7 100644 --- a/storage.py +++ b/storage.py @@ -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)