Asymmetric result in isomorphism function

Hi Tiago,

I was working with the gt.topology.isomorphism function, and came across some interesting behaviour, where isomorpism(g1, g2) would return False and isomorphism(g2, g1) returned True. This is the code:

real_graph = gt.collection.ns["lesmis"]
real_motifs, real_counts, real_locations = gt.clustering.motifs(real_graph, 3, return_maps = True)

test_motif = real_motifs[0]
loc = real_locations[0][0]

subgraph = gt.GraphView(real_graph, vfilt = lambda v: True if v in loc.a else False)

gt.topology.isomorphism(subgraph, test_motif)  #returns True
gt.topology.isomorphism(test_motif, subgraph)  #returns False

Is it a bug, or am I doing something wrong with the GraphView?

I am using graph-tool version 2.63

Thank you!

Wow, this is certainly a bug!

A workaround is to do remove filtering:

subgraph = Graph(subgraph, prune=True)

Could you please also open an issue for this? I’ll get around fixing this and the other issue as soon as I have a little bit of time.

FYI, this has been fixed in the newest release.