Commit 24a16870 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Do not mix yield and return in subgraph_isomorphism()

parent ca2b8d11
Pipeline #76 passed with stage
......@@ -370,12 +370,9 @@ def subgraph_isomorphism(sub, g, max_n=0, vertex_label=None, edge_label=None,
max_n, induced, not subgraph,
generator)
if generator:
for vmap in vmaps:
yield PropertyMap(vmap, sub, "v")
return (PropertyMap(vmap, sub, "v") for vmap in vmaps)
else:
for i in range(len(vmaps)):
vmaps[i] = PropertyMap(vmaps[i], sub, "v")
return vmaps
return [PropertyMap(vmap, sub, "v") for vmap in vmaps]
def mark_subgraph(g, sub, vmap, vmask=None, emask=None):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment