From 93e15c0f88d7f0e2bffaf83a82d696b6aabea8cf Mon Sep 17 00:00:00 2001 From: Rick Ratzel <3039903+rlratzel@users.noreply.github.com> Date: Mon, 1 Aug 2022 08:54:25 -0400 Subject: [PATCH] Updated imports to be compatible with latest version of cupy (#2473) Updated imports to be compatible with latest version of cupy and also changed corresponding scipy imports for consistency. Authors: - Rick Ratzel (https://github.com/rlratzel) Approvers: - Brad Rees (https://github.com/BradReesWork) URL: https://github.com/rapidsai/cugraph/pull/2473 --- python/cugraph/cugraph/tests/test_bfs.py | 12 ++++++------ python/cugraph/cugraph/tests/test_connectivity.py | 12 ++++++------ python/cugraph/cugraph/tests/test_sssp.py | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/python/cugraph/cugraph/tests/test_bfs.py b/python/cugraph/cugraph/tests/test_bfs.py index fb2dd5de122..0009d4b5250 100644 --- a/python/cugraph/cugraph/tests/test_bfs.py +++ b/python/cugraph/cugraph/tests/test_bfs.py @@ -23,12 +23,12 @@ import pandas as pd import cupy as cp -from cupyx.scipy.sparse.coo import coo_matrix as cp_coo_matrix -from cupyx.scipy.sparse.csr import csr_matrix as cp_csr_matrix -from cupyx.scipy.sparse.csc import csc_matrix as cp_csc_matrix -from scipy.sparse.coo import coo_matrix as sp_coo_matrix -from scipy.sparse.csr import csr_matrix as sp_csr_matrix -from scipy.sparse.csc import csc_matrix as sp_csc_matrix +from cupyx.scipy.sparse import coo_matrix as cp_coo_matrix +from cupyx.scipy.sparse import csr_matrix as cp_csr_matrix +from cupyx.scipy.sparse import csc_matrix as cp_csc_matrix +from scipy.sparse import coo_matrix as sp_coo_matrix +from scipy.sparse import csr_matrix as sp_csr_matrix +from scipy.sparse import csc_matrix as sp_csc_matrix # Temporarily suppress warnings till networkX fixes deprecation warnings # (Using or importing the ABCs from 'collections' instead of from diff --git a/python/cugraph/cugraph/tests/test_connectivity.py b/python/cugraph/cugraph/tests/test_connectivity.py index 0de9084ffcc..6d31c39c447 100644 --- a/python/cugraph/cugraph/tests/test_connectivity.py +++ b/python/cugraph/cugraph/tests/test_connectivity.py @@ -18,12 +18,12 @@ import pytest import cupy as cp import numpy as np -from cupyx.scipy.sparse.coo import coo_matrix as cp_coo_matrix -from cupyx.scipy.sparse.csr import csr_matrix as cp_csr_matrix -from cupyx.scipy.sparse.csc import csc_matrix as cp_csc_matrix -from scipy.sparse.coo import coo_matrix as sp_coo_matrix -from scipy.sparse.csr import csr_matrix as sp_csr_matrix -from scipy.sparse.csc import csc_matrix as sp_csc_matrix +from cupyx.scipy.sparse import coo_matrix as cp_coo_matrix +from cupyx.scipy.sparse import csr_matrix as cp_csr_matrix +from cupyx.scipy.sparse import csc_matrix as cp_csc_matrix +from scipy.sparse import coo_matrix as sp_coo_matrix +from scipy.sparse import csr_matrix as sp_csr_matrix +from scipy.sparse import csc_matrix as sp_csc_matrix import cudf import cugraph diff --git a/python/cugraph/cugraph/tests/test_sssp.py b/python/cugraph/cugraph/tests/test_sssp.py index aad06a51e69..ac6c7662855 100644 --- a/python/cugraph/cugraph/tests/test_sssp.py +++ b/python/cugraph/cugraph/tests/test_sssp.py @@ -18,12 +18,12 @@ import pytest import pandas as pd import cupy as cp -from cupyx.scipy.sparse.coo import coo_matrix as cp_coo_matrix -from cupyx.scipy.sparse.csr import csr_matrix as cp_csr_matrix -from cupyx.scipy.sparse.csc import csc_matrix as cp_csc_matrix -from scipy.sparse.coo import coo_matrix as sp_coo_matrix -from scipy.sparse.csr import csr_matrix as sp_csr_matrix -from scipy.sparse.csc import csc_matrix as sp_csc_matrix +from cupyx.scipy.sparse import coo_matrix as cp_coo_matrix +from cupyx.scipy.sparse import csr_matrix as cp_csr_matrix +from cupyx.scipy.sparse import csc_matrix as cp_csc_matrix +from scipy.sparse import coo_matrix as sp_coo_matrix +from scipy.sparse import csr_matrix as sp_csr_matrix +from scipy.sparse import csc_matrix as sp_csc_matrix import cudf import cugraph