Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Malte R
graph-tool
Commits
8ffeeb12
Commit
8ffeeb12
authored
Mar 22, 2020
by
Tiago Peixoto
Browse files
motifs(): fix bug with 'return_maps=True`
This fixes issue #627
parent
83ef9971
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/clustering/__init__.py
View file @
8ffeeb12
...
...
@@ -46,7 +46,7 @@ from __future__ import division, absolute_import, print_function
from
..
dl_import
import
dl_import
dl_import
(
"from . import libgraph_tool_clustering as _gt"
)
from
..
import
_degree
,
_prop
,
Graph
,
GraphView
,
PropertyMap
,
_get_rng
from
..
import
_degree
,
_prop
,
Graph
,
GraphView
,
Vertex
PropertyMap
,
_get_rng
from
..
topology
import
isomorphism
from
..
generation
import
random_rewire
from
..
stats
import
vertex_hist
...
...
@@ -415,7 +415,7 @@ def motifs(g, k, p=1.0, motif_list=None, return_maps=False):
vertex_maps
=
[
x
[
2
]
for
x
in
list_hist
]
for
i
,
vlist
in
enumerate
(
vertex_maps
):
sub
=
sub_list
[
i
]
vertex_maps
[
i
]
=
[
PropertyMap
(
vm
,
sub
,
"v"
)
for
vm
in
vlist
]
vertex_maps
[
i
]
=
[
Vertex
PropertyMap
(
vm
,
sub
)
for
vm
in
vlist
]
return
sub_list
,
hist
,
vertex_maps
return
sub_list
,
hist
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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