diff --git a/pandas/tests/test_algos.py b/pandas/tests/test_algos.py index d6228d031bfd5..6008b4f9f4e33 100644 --- a/pandas/tests/test_algos.py +++ b/pandas/tests/test_algos.py @@ -331,25 +331,25 @@ def test_factorize_na_sentinel(self, sort, na_sentinel, data, uniques): ( ["a", None, "b", "a"], True, - np.array([0, -1, 1, 0], dtype=np.int64), + np.array([0, -1, 1, 0], dtype=np.dtype("intp")), np.array(["a", "b"], dtype=object), ), ( ["a", np.nan, "b", "a"], True, - np.array([0, -1, 1, 0], dtype=np.int64), + np.array([0, -1, 1, 0], dtype=np.dtype("intp")), np.array(["a", "b"], dtype=object), ), ( ["a", None, "b", "a"], False, - np.array([0, 2, 1, 0], dtype=np.int64), + np.array([0, 2, 1, 0], dtype=np.dtype("intp")), np.array(["a", "b", np.nan], dtype=object), ), ( ["a", np.nan, "b", "a"], False, - np.array([0, 2, 1, 0], dtype=np.int64), + np.array([0, 2, 1, 0], dtype=np.dtype("intp")), np.array(["a", "b", np.nan], dtype=object), ), ], @@ -368,25 +368,25 @@ def test_object_factorize_dropna( ( [1, None, 1, 2], True, - np.array([0, -1, 0, 1], dtype=np.int64), + np.array([0, -1, 0, 1], dtype=np.dtype("intp")), np.array([1, 2], dtype="O"), ), ( [1, np.nan, 1, 2], True, - np.array([0, -1, 0, 1], dtype=np.int64), + np.array([0, -1, 0, 1], dtype=np.dtype("intp")), np.array([1, 2], dtype=np.float64), ), ( [1, None, 1, 2], False, - np.array([0, 2, 0, 1], dtype=np.int64), + np.array([0, 2, 0, 1], dtype=np.dtype("intp")), np.array([1, 2, np.nan], dtype="O"), ), ( [1, np.nan, 1, 2], False, - np.array([0, 2, 0, 1], dtype=np.int64), + np.array([0, 2, 0, 1], dtype=np.dtype("intp")), np.array([1, 2, np.nan], dtype=np.float64), ), ],