diff options
author | Ross Barnowski <rossbar@berkeley.edu> | 2021-12-12 21:55:12 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-12 21:55:12 -0800 |
commit | d0d2eb5c02f8f89307eff989284912e13b3a7b73 (patch) | |
tree | f84bb432720c08ca0532cb5234adf4dd16bcc67c /networkx/drawing | |
parent | 84b1fb60a2373966aa47eee54a82c045ac663172 (diff) | |
download | networkx-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.py | 2 |
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]) |