Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • graph-tool graph-tool
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 47
    • Issues 47
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • 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

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

Closed
Open
Created Aug 06, 2014 by Tiago Peixoto@count0Owner

Possible bug in minimize_nested_blockmodel_dl

Hi, I cannot get the example code for minimize_nested_blockmodel to run. I get the same error for other networks, too. Perhaps there is a bug?

Ubuntu Python 2.7.5+ (default, Feb 27 2014, 19:37:08)

In [1]: import graph_tool.all as gt

In [4]: g = gt.collection.data["power"]

In [5]: bstack, mdl = gt.minimize_nested_blockmodel_dl(g, deg_corr=True)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-5-a99a59d4780e> in <module>()
----> 1 bstack, mdl = gt.minimize_nested_blockmodel_dl(g, deg_corr=True)

/usr/lib/python2.7/dist-packages/graph_tool/community/nested_blockmodel.pyc in minimize_nested_blockmodel_dl(g, Bs, bs, deg_corr, dense, eweight, vweight, nsweeps, epsilon, c, nmerge_sweeps, r, sparse_thresh, se\
quential, verbose, checkpoint, minimize_state)
   1045                                   sparse_thresh=sparse_thresh,
   1046                                   checkpoint=checkpoint,
-> 1047                                   minimize_state=minimize_state)
   1048     else:
   1049         state = NestedBlockState(g, bs=bs, deg_corr=deg_corr, eweight=eweight,

/usr/lib/python2.7/dist-packages/graph_tool/community/nested_blockmodel.pyc in init_nested_state(g, Bs, deg_corr, dense, eweight, vweight, nsweeps, epsilon, r, nmerge_sweeps, c, sequential, sparse_thresh, checkp\
oint, minimize_state, max_BE, verbose)
    844         ecount = state.levels[l].mrs
    845
--> 846     minimize_state.clear()
    847     mstate.sync(state)
    848     if checkpoint is not None:

/usr/lib/python2.7/dist-packages/graph_tool/community/nested_blockmodel.pyc in clear(self)
    437         self.minimize_state.clear()
    438         self.l = -1
--> 439         self.bs.clear()
    440         self.done.clear()
    441

AttributeError: 'list' object has no attribute 'clear'
Assignee
Assign to
Time tracking