summaryrefslogtreecommitdiff
path: root/networkx/algorithms/assortativity/correlation.py
diff options
context:
space:
mode:
Diffstat (limited to 'networkx/algorithms/assortativity/correlation.py')
-rw-r--r--networkx/algorithms/assortativity/correlation.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/networkx/algorithms/assortativity/correlation.py b/networkx/algorithms/assortativity/correlation.py
index 48801eb6..19ea04e0 100644
--- a/networkx/algorithms/assortativity/correlation.py
+++ b/networkx/algorithms/assortativity/correlation.py
@@ -285,7 +285,7 @@ def _numeric_ac(M, mapping):
import numpy as np
if M.sum() != 1.0:
- M = M / float(M.sum())
+ M = M / M.sum()
x = np.array(list(mapping.keys()))
y = x # x and y have the same support
idx = list(mapping.values())