pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
43.85k stars 18k forks source link

BUG: IntervalIndex.from_arrays with int64 vs uint64 arrays #55715

Open jbrockmendel opened 1 year ago

jbrockmendel commented 1 year ago
ser = pd.Series(range(5))
ser2 = ser.astype("uint64")

ii = pd.IntervalIndex.from_arrays(ser.values, ser2.values)

>>> ii.right.dtype
dtype('uint64')

We do some casting in _ensure_simple_new_inputs to check we have matching dtypes, but looks like we miss signed-vs-unsigned cases.

theredditbandit commented 1 year ago

Hi , I would like to work on this issue. Could you provide some more info on the bug and what is expected in the bugfix.