0

I am trying to reproduce an example from the graph-tool documentation on network reconstruction. I noticed that the code changed recently and although it used to return no error before, it now does.

I am running Python 3.6.5 with the graph-tool installed through Docker on Windows OS. Specifically, I have tried running the below code:

1 def collect_marginals(s):
2   global pv, u, cs
3   u = s.collect_marginal(u)
4   bstate = s.get_block_state()
5   b = gt.perfect_prop_hash([bstate.levels[0].b])[0]
6   pv = bstate.levels[0].collect_vertex_marginals(pv, b=b)
7   cs.append(gt.local_clustering(s.get_graph()).fa.mean())

The error message that I get is: "TypeError: collect_vertex_marginals() got an unexpected keyword argument 'b'"

In the previous version of the function which was running successfully:

a) 'collect_vertex_marginals' in line 6 did not have the 'b' argument

b) line 5 of the above code did not exist.

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199

1 Answers1

0

You are using an older version of the library. You must upgrade to the newest release.

Tiago Peixoto
  • 5,149
  • 2
  • 28
  • 28