Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
graph-tool
graph-tool
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 40
    • Issues 40
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards

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 mailing list at https://graph-tool.skewed.de/mailing
(If unsure, use the mailing list first.)



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
  • #269

Closed
Open
Opened Jan 29, 2016 by Di@Cao

Calling graph_draw() with a graph containing no edges will raise "Value Error" exception

To reproduce this issue, please execute the Python script attached to this issue report.
no_edge.py

Command line dump:

ubuntu@ubuntu-VirtualBox:~/Desktop/Jie$ python ./no_edge.py   
Traceback (most recent call last):   
  File "./no_edge.py", line 7, in <module>   
    graph_draw(g, output="./nodes-only.png")   
  File "/usr/lib/python2.7/dist-packages/graph_tool/draw/cairo_draw.py", line 1134, in graph_draw   
    pad, cr)   
  File "/usr/lib/python2.7/dist-packages/graph_tool/draw/cairo_draw.py", line 1308, in fit_to_view   
    font_size, cr)   
  File "/usr/lib/python2.7/dist-packages/graph_tool/draw/cairo_draw.py", line 1277, in get_bb   
    slm = sl.fa.max() * 0.75   
  File "/usr/lib/python2.7/dist-packages/numpy/core/_methods.py", line 17, in _amax   
    out=out, keepdims=keepdims)   
ValueError: zero-size array to reduction operation maximum which has no identity   
ubuntu@ubuntu-VirtualBox:~/Desktop/Jie$   

This issue seems to have similarity to the closed issue #161 (closed)

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: count0/graph-tool#269