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 48
    • Issues 48
    • 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 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
  • #678
Closed
Open
Issue created Aug 10, 2020 by Dan Sprague@dsprague

NestedBlockState with base_state=OverlapBlockState array broadcasting error

This is reproducible on Ubuntu even with provided test data. Here is the code:

g = gt.collection.data["celegansneural"] 
state= NestedBlockState(g,base_type=OverlapBlockState)

Yields the traceback:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-85-aaf1edba7efe> in <module>
----> 1 NestedBlockState(g,base_type=OverlapBlockState)

~/anaconda3/envs/gt/lib/python3.8/site-packages/graph_tool/inference/nested_blockmodel.py in __init__(self, g, bs, base_type, state_args, hstate_args, hentropy_args, sampling, **kwargs)
    102                                   recs_dl=False,
    103                                   beta_dl=1.)
--> 104         self.levels = [base_type(g, b=bs[0], **self.state_args)]
    105         for i, b in enumerate(bs[1:]):
    106             state = self.levels[-1]

~/anaconda3/envs/gt/lib/python3.8/site-packages/graph_tool/inference/overlap_blockmodel.py in __init__(self, g, b, B, recs, rec_types, rec_params, clabel, pclabel, deg_corr, dense_bg, **kwargs)
    109             # substitute provided graph by its half-edge graph
    110             g, b, node_index, half_edges, eindex, rec = \
--> 111                                                 half_edge_graph(g, b, B, rec)
    112 
    113             if len(recs) > 0:

~/anaconda3/envs/gt/lib/python3.8/site-packages/graph_tool/inference/overlap_blockmodel.py in half_edge_graph(g, b, B, rec)
    798 
    799     if b_array is not None:
--> 800         be.a = b_array
    801 
    802     if rec is None:

~/anaconda3/envs/gt/lib/python3.8/site-packages/graph_tool/__init__.py in __set_array(self, v)
    486             raise TypeError("cannot set property map values from array for" +
    487                             " property map of type: " + self.value_type())
--> 488         a[:] = v
    489 
    490     a = property(get_array, __set_array,

ValueError: could not broadcast input array from shape (594) into shape (4718)
Assignee
Assign to
Time tracking