Commit 971de369 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Safeguard for empty graphs in subgraph_isomorphism()

parent b0d238d2
......@@ -265,6 +265,8 @@ def subgraph_isomorphism(sub, g, max_n=0, random=False):
.. [subgraph-isormophism-wikipedia]
if sub.num_vertices() == 0:
raise ValueError("Cannot search for an empty subgraph.")
# vertex and edge labels disabled for the time being, until GCC is capable
# of compiling all the variants using reasonable amounts of memory
vlabels=(None, None)
Supports Markdown
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