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
Tiago Peixoto
graph-tool
Commits
83ef9971
Commit
83ef9971
authored
Mar 22, 2020
by
Tiago Peixoto
Browse files
sfdp_layoyt(): check type of 'groups' parameter
This fixes issue
#632
parent
d1cdc9da
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/draw/__init__.py
View file @
83ef9971
...
...
@@ -68,8 +68,9 @@ Contents
from
__future__
import
division
,
absolute_import
,
print_function
from
..
import
Graph
,
GraphView
,
_check_prop_vector
,
group_vector_property
,
\
ungroup_vector_property
,
infect_vertex_property
,
_prop
,
_get_rng
from
..
import
Graph
,
GraphView
,
_check_prop_vector
,
_check_prop_scalar
,
\
group_vector_property
,
ungroup_vector_property
,
infect_vertex_property
,
\
_prop
,
_get_rng
from
..
topology
import
max_cardinality_matching
,
max_independent_vertex_set
,
\
label_components
,
pseudo_diameter
,
shortest_distance
,
make_maximal_planar
,
\
is_planar
...
...
@@ -686,6 +687,8 @@ def sfdp_layout(g, vweight=None, eweight=None, pin=None, groups=None, C=0.2,
if
pos
is
None
:
pos
=
random_layout
(
g
,
dim
=
2
)
_check_prop_vector
(
pos
,
name
=
"pos"
,
floating
=
True
)
if
groups
is
not
None
:
_check_prop_scalar
(
groups
,
name
=
"groups"
,
floating
=
False
)
g_
=
g
g
=
GraphView
(
g
,
directed
=
False
)
...
...
Write
Preview
Markdown
is supported
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