summaryrefslogtreecommitdiff
path: root/networkx/drawing
diff options
context:
space:
mode:
authorRoss Barnowski <rossbar@berkeley.edu>2021-12-12 21:55:12 -0800
committerGitHub <noreply@github.com>2021-12-12 21:55:12 -0800
commitd0d2eb5c02f8f89307eff989284912e13b3a7b73 (patch)
treef84bb432720c08ca0532cb5234adf4dd16bcc67c /networkx/drawing
parent84b1fb60a2373966aa47eee54a82c045ac663172 (diff)
downloadnetworkx-d0d2eb5c02f8f89307eff989284912e13b3a7b73.tar.gz
Compatibility updates from testing with numpy/scipy/pytest rc's (#5226)
* Rm deprecated scipy subpkg access. * Use recwarn fixture in place of deprecated pytest pattern. * Rm unnecessary try/except from tests.
Diffstat (limited to 'networkx/drawing')
-rw-r--r--networkx/drawing/layout.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/networkx/drawing/layout.py b/networkx/drawing/layout.py
index 43ae718b..dd6a2067 100644
--- a/networkx/drawing/layout.py
+++ b/networkx/drawing/layout.py
@@ -884,7 +884,7 @@ def _sparse_spectral(A, dim=2):
# number of Lanczos vectors for ARPACK solver.What is the right scaling?
ncv = max(2 * k + 1, int(np.sqrt(nnodes)))
# return smallest k eigenvalues and eigenvectors
- eigenvalues, eigenvectors = sp.sparse.linalg.eigen.eigsh(L, k, which="SM", ncv=ncv)
+ eigenvalues, eigenvectors = sp.sparse.linalg.eigsh(L, k, which="SM", ncv=ncv)
index = np.argsort(eigenvalues)[1:k] # 0 index is zero eigenvalue
return np.real(eigenvectors[:, index])