diff --git a/networkx/algorithms/similarity.py b/networkx/algorithms/similarity.py index 24f303b13c9..7af9c8980fe 100644 --- a/networkx/algorithms/similarity.py +++ b/networkx/algorithms/similarity.py @@ -1520,7 +1520,7 @@ def _simrank_similarity_numpy( ) if source is not None and target is not None: - return newsim[source, target] + return float(newsim[source, target]) if source is not None: return newsim[source] return newsim