Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • graph-tool graph-tool
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 54
    • Issues 54
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Admin message

Please use the issue tracker only to report bugs (i.e. errors in the library that need to be fixed) or feature requests.

For questions about how to compile, install or use the library, please use instead the web forum at https://forum.skewed.de/c/graph-tool.


(If unsure, use the forum first.)


IMPORTANT: When opening new issues, please choose the BUG template from the drop-down menu, and fill out the required information.

  • Tiago Peixoto
  • graph-toolgraph-tool
  • Issues
  • #627
Closed
Open
Issue created Feb 03, 2020 by Ilaria Ricchi@iricchi

return_maps not working in clustering.motifs

I am trying to return the maps of the motifs to identify the vertex on the original graph but this exception rises:

Exception                                 Traceback (most recent call last)
<ipython-input-292-1c9ba08feccd> in <module>
----> 1 motifs, counts = graph_tool.clustering.motifs(g,3,return_maps=True)
      2 motifs

/usr/lib/python3/dist-packages/graph_tool_hack/graph_tool/clustering/__init__.py in motifs(g, k, p, motif_list, return_maps)
    416         for i, vlist in enumerate(vertex_maps):
    417             sub = sub_list[i]
--> 418             vertex_maps[i] = [PropertyMap(vm, sub, "v") for vm in vlist]
    419         return sub_list, hist, vertex_maps
    420     return sub_list, hist

/usr/lib/python3/dist-packages/graph_tool_hack/graph_tool/clustering/__init__.py in <listcomp>(.0)
    416         for i, vlist in enumerate(vertex_maps):
    417             sub = sub_list[i]
--> 418             vertex_maps[i] = [PropertyMap(vm, sub, "v") for vm in vlist]
    419         return sub_list, hist, vertex_maps
    420     return sub_list, hist

/usr/lib/python3/dist-packages/graph_tool_hack/graph_tool/__init__.py in __init__(self, pmap, g, key_type)
    388     def __init__(self, pmap, g, key_type):
    389         if type(self) == PropertyMap:
--> 390             raise Exception("PropertyMap cannot be instantiated directly")
    391         self.__map = pmap
    392         self.__g = weakref.ref(g)

Exception: PropertyMap cannot be instantiated directly

My code is simply :

motifs, counts = graph_tool.clustering.motifs(g,3,return_maps=True)

(g has vertex properties)

Edited Feb 10, 2020 by Ilaria Ricchi
Assignee
Assign to
Time tracking