diff --git a/src/dynamic_graph/signal_base.py b/src/dynamic_graph/signal_base.py index 034b041dfafe9de73eb5ab293f385d4d079f97c9..0e0ce5ede3bd55ba10e27cf6f77d6e568a46b01d 100644 --- a/src/dynamic_graph/signal_base.py +++ b/src/dynamic_graph/signal_base.py @@ -101,12 +101,12 @@ def objectToString(obj) : - an integer, - a boolean, """ - if (isinstance(obj, collections.Iterable)) : + if (hasattr (obj, "__iter__")) : # matrix or vector if len(obj) is 0 : return "" else : - if (isinstance(obj[0], collections.Iterable)) : + if (hasattr(obj[0], "__iter__")) : #matrix return matrixToString(obj) else :