diff --git a/pandas/conftest.py b/pandas/conftest.py index 4639799d2ee03e..d74ec1afce1274 100644 --- a/pandas/conftest.py +++ b/pandas/conftest.py @@ -593,10 +593,7 @@ def _create_mi_with_dt64tz_level(): "datetime-tz": tm.makeDateIndex(100, tz="US/Pacific"), "period": tm.makePeriodIndex(100), "timedelta": tm.makeTimedeltaIndex(100), - "int": tm.makeIntIndex(100), - "uint": tm.makeUIntIndex(100), "range": tm.makeRangeIndex(100), - "float": tm.makeFloatIndex(100), "complex64": tm.makeFloatIndex(100).astype("complex64"), "complex128": tm.makeFloatIndex(100).astype("complex128"), "num_int64": tm.makeNumericIndex(100, dtype="int64"), diff --git a/pandas/tests/arrays/interval/test_interval.py b/pandas/tests/arrays/interval/test_interval.py index 2a6bea32553429..92437e8ebdc895 100644 --- a/pandas/tests/arrays/interval/test_interval.py +++ b/pandas/tests/arrays/interval/test_interval.py @@ -287,7 +287,7 @@ def test_arrow_array(): with pytest.raises(TypeError, match="Not supported to convert IntervalArray"): pa.array(intervals, type="float64") - with pytest.raises(TypeError, match="different 'subtype'"): + with pytest.raises(TypeError, match="Not supported to convert IntervalArray"): pa.array(intervals, type=ArrowIntervalType(pa.float64(), "left")) diff --git a/pandas/tests/arrays/sparse/test_accessor.py b/pandas/tests/arrays/sparse/test_accessor.py index 36af5d32ae4616..df5dd8b8b182c5 100644 --- a/pandas/tests/arrays/sparse/test_accessor.py +++ b/pandas/tests/arrays/sparse/test_accessor.py @@ -41,7 +41,12 @@ def test_from_coo(self): sp_array = scipy.sparse.coo_matrix((data, (row, col)), dtype="int") result = pd.Series.sparse.from_coo(sp_array) - index = pd.MultiIndex.from_arrays([[0, 0, 1, 3], [0, 2, 1, 3]]) + index = pd.MultiIndex.from_arrays( + [ + np.array([0, 0, 1, 3], dtype=np.int32), + np.array([0, 2, 1, 3], dtype=np.int32), + ], + ) expected = pd.Series([4, 9, 7, 5], index=index, dtype="Sparse[int]") tm.assert_series_equal(result, expected) @@ -212,7 +217,15 @@ def test_series_from_coo(self, dtype, dense_index): A = scipy.sparse.eye(3, format="coo", dtype=dtype) result = pd.Series.sparse.from_coo(A, dense_index=dense_index) - index = pd.MultiIndex.from_tuples([(0, 0), (1, 1), (2, 2)]) + + index_dtype = np.int64 if dense_index else np.int32 + index = pd.MultiIndex.from_tuples( + [ + np.array([0, 0], dtype=index_dtype), + np.array([1, 1], dtype=index_dtype), + np.array([2, 2], dtype=index_dtype), + ], + ) expected = pd.Series(SparseArray(np.array([1, 1, 1], dtype=dtype)), index=index) if dense_index: expected = expected.reindex(pd.MultiIndex.from_product(index.levels))