Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanIsCoding committed Jun 21, 2023
1 parent 5429f0a commit 9a56d6d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rustworkx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1358,6 +1358,7 @@ def eigenvector_centrality(graph, weight_fn=None, default_weight=1.0, max_iter=1
centrality score for that node.
:rtype: CentralityMapping
"""
raise TypeError("Invalid input type %s for graph" % type(graph))


eigenvector_centrality.register(PyDiGraph, digraph_eigenvector_centrality)
Expand Down Expand Up @@ -1408,10 +1409,11 @@ def katz_centrality(
centrality score for that node.
:rtype: CentralityMapping
"""
raise TypeError("Invalid input type %s for graph" % type(graph))


eigenvector_centrality.register(PyDiGraph, digraph_katz_centrality)
eigenvector_centrality.register(PyGraph, graph_katz_centrality)
katz_centrality.register(PyDiGraph, digraph_katz_centrality)
katz_centrality.register(PyGraph, graph_katz_centrality)


@functools.singledispatch
Expand Down

0 comments on commit 9a56d6d

Please sign in to comment.