Skip to content

IntervalIndex Comparisons of Signed / Unsigned #30365

Closed
@WillAyd

Description

@WillAyd

Compiling intervaltree.pxi.in yields 128 warnings in the build, most of which deal with the comparison of signed and unsigned data.

These warnings add to the compile time, but also for sure highlight bugs like this:

# Create an IntervalIndex using values only in the range of uint64
>>> ser = pd.Series([1], index=pd.IntervalIndex.from_tuples([((2 ** 63), (2 ** 64)-1)]))
# Negative value isn't in those ranges, but overflow yields undefined behavior
>>> ser[[-20]]
(9223372036854775808, 18446744073709551615]    1
dtype: int64

I think should probably separate unsigned vs signed parametrization

Metadata

Metadata

Assignees

No one assigned

    Labels

    IntervalInterval data type

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions