diff options
| author | Dan Schult <dschult@colgate.edu> | 2015-10-31 22:42:05 -0400 |
|---|---|---|
| committer | Dan Schult <dschult@colgate.edu> | 2015-10-31 22:42:05 -0400 |
| commit | 90a796fbe6a18644411353e8a034318c461ba3fd (patch) | |
| tree | 3df952578bff17411e63e81b2f588ad410ea2d79 | |
| parent | e663a38a46204717dcd4543be866e48c30dd6503 (diff) | |
| download | networkx-docs-for-v1.11.tar.gz | |
Fix algebraicconnectivity float conversiondocs-for-v1.11
| -rw-r--r-- | networkx/linalg/algebraicconnectivity.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/networkx/linalg/algebraicconnectivity.py b/networkx/linalg/algebraicconnectivity.py index 74c9fb71..6d85af7d 100644 --- a/networkx/linalg/algebraicconnectivity.py +++ b/networkx/linalg/algebraicconnectivity.py @@ -244,7 +244,7 @@ def _tracemin_fiedler(L, X, normalized, tol, method): W -= (W.T * X * X.T).T project(W) # Compute the diagonal of P * L * P as a Jacobi preconditioner. - D = L.diagonal() + D = L.diagonal().astype(float) D += 2. * (asarray(X) * asarray(W)).sum(axis=1) D += (asarray(X) * asarray(X * (W.T * X))).sum(axis=1) D[D < tol * Lnorm] = 1. |
