Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/core/indexes/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def maybe_convert_platform_interval(values):
# GH 19016
# empty lists/tuples get object dtype by default, but this is not
# prohibited for IntervalIndex, so coerce to integer instead
return np.array([], dtype=np.intp)
return np.array([], dtype=np.int64)
return maybe_convert_platform(values)


Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/indexes/interval/test_interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_constructors_nan(self, closed, data):
np.array([], dtype='datetime64[ns]')])
def test_constructors_empty(self, data, closed):
# GH 18421
expected_dtype = getattr(data, 'dtype', np.intp)
expected_dtype = getattr(data, 'dtype', np.int64)
expected_values = np.array([], dtype=object)
expected_index = IntervalIndex(data, closed=closed)

Expand Down