Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
dynamic-graph-python
Commits
45e684e7
Commit
45e684e7
authored
Apr 05, 2013
by
Florent Lamiraux
Committed by
Florent Lamiraux florent@laas.fr
Apr 05, 2013
Browse files
Allow iterable instead of only tuple in signal value affectation.
parent
22ce1edb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/dynamic_graph/signal_base.py
View file @
45e684e7
...
...
@@ -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
,
tup
le
))
:
if
(
isinstance
(
obj
,
collections
.
Iterab
le
))
:
# matrix or vector
if
len
(
obj
)
is
0
:
return
""
else
:
if
(
isinstance
(
obj
[
0
],
tup
le
))
:
if
(
isinstance
(
obj
[
0
],
collections
.
Iterab
le
))
:
#matrix
return
matrixToString
(
obj
)
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment