diff --git a/python/cudf/cudf/core/algorithms.py b/python/cudf/cudf/core/algorithms.py index 12bd17e1f6a..af908a664dc 100644 --- a/python/cudf/cudf/core/algorithms.py +++ b/python/cudf/cudf/core/algorithms.py @@ -53,7 +53,7 @@ def factorize(values, sort=False, na_sentinel=-1, size_hint=None): if size_hint: warn("size_hint is not applicable for cudf.factorize") - return_cupy_array = isinstance(values, cp.core.core.ndarray) + return_cupy_array = isinstance(values, cp.ndarray) values = Series(values) diff --git a/python/cudf/cudf/tests/test_dataframe.py b/python/cudf/cudf/tests/test_dataframe.py index 06b08d79093..4890ccc289e 100644 --- a/python/cudf/cudf/tests/test_dataframe.py +++ b/python/cudf/cudf/tests/test_dataframe.py @@ -6069,7 +6069,7 @@ def test_dataframe_init_1d_list(data, columns): def test_dataframe_init_from_arrays_cols(data, cols, index): gd_data = data - if isinstance(data, cupy.core.ndarray): + if isinstance(data, cupy.ndarray): # pandas can't handle cupy arrays in general pd_data = data.get() diff --git a/python/cudf/cudf/tests/test_factorize.py b/python/cudf/cudf/tests/test_factorize.py index 61d11fa5961..cd0f870e0d5 100644 --- a/python/cudf/cudf/tests/test_factorize.py +++ b/python/cudf/cudf/tests/test_factorize.py @@ -20,7 +20,7 @@ def test_factorize_series_obj(ncats, nelem): uvals, labels = df["cats"].factorize() np.testing.assert_array_equal(labels.to_array(), sorted(set(arr))) - assert isinstance(uvals, cp.core.core.ndarray) + assert isinstance(uvals, cp.ndarray) assert isinstance(labels, Index) encoder = dict((labels[idx], idx) for idx in range(len(labels))) @@ -39,7 +39,7 @@ def test_factorize_index_obj(ncats, nelem): uvals, labels = df.index.factorize() np.testing.assert_array_equal(labels.values.get(), sorted(set(arr))) - assert isinstance(uvals, cp.core.core.ndarray) + assert isinstance(uvals, cp.ndarray) assert isinstance(labels, Index) encoder = dict((labels[idx], idx) for idx in range(len(labels))) @@ -127,15 +127,15 @@ def test_factorize_result_classes(): labels, cats = cudf.factorize(cudf.Series(data)) - assert isinstance(labels, cp.core.core.ndarray) + assert isinstance(labels, cp.ndarray) assert isinstance(cats, cudf.Index) labels, cats = cudf.factorize(cudf.Index(data)) - assert isinstance(labels, cp.core.core.ndarray) + assert isinstance(labels, cp.ndarray) assert isinstance(cats, cudf.Index) labels, cats = cudf.factorize(cp.array(data)) - assert isinstance(labels, cp.core.core.ndarray) - assert isinstance(cats, cp.core.core.ndarray) + assert isinstance(labels, cp.ndarray) + assert isinstance(cats, cp.ndarray)