diff --git a/src/dynamic_graph/signal_base.py b/src/dynamic_graph/signal_base.py index 66e48359bab9c6fc3ae54566e666dab820ea64db..034b041dfafe9de73eb5ab293f385d4d079f97c9 100644 --- a/src/dynamic_graph/signal_base.py +++ b/src/dynamic_graph/signal_base.py @@ -6,6 +6,7 @@ import wrap import entity import re +import collections def stringToTuple (vector) : """ @@ -100,12 +101,12 @@ def objectToString(obj) : - an integer, - a boolean, """ - if (isinstance(obj, tuple)) : + if (isinstance(obj, collections.Iterable)) : # matrix or vector if len(obj) is 0 : return "" else : - if (isinstance(obj[0], tuple)) : + if (isinstance(obj[0], collections.Iterable)) : #matrix return matrixToString(obj) else :