We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a tiny point, but just for record:
graph_tools.DiGraph
>>> adj_matrix = np.array([]).reshape(0, 0) >>> adj_matrix array([], shape=(0, 0), dtype=float64) >>> null_digraph = qe.DiGraph(adj_matrix) >>> null_digraph Directed Graph: - n(number of nodes): 0 >>> null_digraph.is_strongly_connected False >>> null_digraph.num_strongly_connected_components 0 >>> null_digraph.strongly_connected_components [] >>> null_digraph.num_sink_strongly_connected_components 0 >>> null_digraph.sink_strongly_connected_components []
In passing, in Networkx whether or not a null digraph is strongly connected is undefined.
>>> import networkx as nx >>> G = nx.DiGraph() >>> G.number_of_nodes() 0 >>> nx.is_strongly_connected(G) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<string>", line 2, in is_strongly_connected File "/usr/local/lib/python2.7/site-packages/networkx/utils/decorators.py", line 68, in _not_implemented_for return f(*args,**kwargs) File "/usr/local/lib/python2.7/site-packages/networkx/algorithms/components/strongly_connected.py", line 287, in is_strongly_connected """Connectivity is undefined for the null graph.""") networkx.exception.NetworkXPointlessConcept: Connectivity is undefined for the null graph. >>> nx.number_strongly_connected_components(G) 0 >>> list(nx.strongly_connected_components(G)) []
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is a tiny point, but just for record:
graph_tools.DiGraph
allow a null graph (a graph with no node)? (It is allowed in the current implementation.)In passing, in Networkx whether or not a null digraph is strongly connected is undefined.
The text was updated successfully, but these errors were encountered: