You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix selfloop_edges AttributeError in algo/graph/mixin_helpers.py
When running the test
`wbia/algo/graph/mixin_dynamic.py::NonDynamicUpdate.apply_nondynamic_update:0`:
```
Traceback (most recent call last):
File "/virtualenv/env3/lib/python3.6/site-packages/xdoctest/doctest_example.py", line 556, in run
exec(code, test_globals)
File "<doctest:/wbia/wildbook-ia/wbia/algo/graph/mixin_dynamic.py::NonDynamicUpdate.apply_nondynamic_update:0>", line rel: 9, abs: 1298, in <module>
>>> infr.assert_neg_metagraph()
File "/wbia/wildbook-ia/wbia/algo/graph/mixin_helpers.py", line 716, in assert_neg_metagraph
[ne[0] for ne in list(infr.neg_metagraph.selfloop_edges())]
AttributeError: 'NiceGraph' object has no attribute 'selfloop_edges'
```
This is because networkx has moved some methods from the base graph class into
the main namespace. See
https://networkx.github.io/documentation/stable/release/migration_guide_from_1.x_to_2.0.html.
So need to change
```
infr.neg_metagraph.selfloop_edges()
```
to
```
nx.selfloop_edges(infr.neg_metagraph)
```
0 commit comments