is_isomorphic: error
See original GitHub issueHello, I am trying to figure out if this is a versioning problem or simply a bug. Thanks
Andrea
(py36) Gundam:~ andreacortis$ ipython
Python 3.6.2 (default, Jul 17 2017, 16:44:45)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import networkx
...: import community
...: print(f'networkx.__version__ = {networkx.__version__}')
...: print(f'community.__version__ = {community.__version__}')
...: n = 5
...: g = networkx.complete_graph(2*n)
...: part = dict([])
...: for node in g.nodes() :
...: part[node] = node % 2
...: ind = community.induced_graph(part, g)
...: goal = networkx.Graph()
...: goal.add_weighted_edges_from([(0,1,n*n),(0,0,n*(n-1)/2), (1, 1, n*(n-1)/2)]) # NOQA
...: networkx.is_isomorphic(int, goal)
...:
networkx.__version__ = 2.2
community.__version__ = 0.13
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-1-60e856d1a473> in <module>()
11 goal = networkx.Graph()
12 goal.add_weighted_edges_from([(0,1,n*n),(0,0,n*(n-1)/2), (1, 1, n*(n-1)/2)]) # NOQA
---> 13 networkx.is_isomorphic(int, goal)
~/Envs/py36/lib/python3.6/site-packages/networkx/algorithms/isomorphism/isomorph.py in is_isomorphic(G1, G2, node_match, edge_match)
228 http://amalfi.dis.unina.it/graph/db/papers/vf-algorithm.pdf
229 """
--> 230 if G1.is_directed() and G2.is_directed():
231 GM = nx.algorithms.isomorphism.DiGraphMatcher
232 elif (not G1.is_directed()) and (not G2.is_directed()):
AttributeError: type object 'int' has no attribute 'is_directed'
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Graph isomorphism problem - Wikipedia
The graph isomorphism problem is the computational problem of determining whether two finite graphs are isomorphic. The problem is not known to be...
Read more >How to Create Isomorphic Example-Problem Pairs for ...
In this paper, we propose the use of isomorphic problems— problems with the same solution procedures—in choosing the example-problem pair. We choose isomorphic...
Read more >Isomorphic Problems - how context can bias problem solutions -
Problem Solving.38. 1. Isomorphic Problems. - how context can bias problem solutions -. Lesson VIII: Problem Solving module 38. Cognitive. Psychology.
Read more >Error Codes - isomorphic-git
Failed to checkout "{ ref }" because commit { oid } is not available locally. Do a git fetch to make the branch...
Read more >react-isomorphic-error-boundary - npm
A reusable isomorphic error boundary for React 16+. Latest version: 1.1.0, last published: 2 years ago.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the fix !
ah, now I see. It is a typo in your documentation. I . mindlessly copy&paste the line
networkx.is_isomorphic(int, goal)
but that should read instead:
networkx.is_isomorphic(ind, goal)
If you fix the typo in the documentation we can close it. Thanks!