DTI/TDI comparison ops with incompatible types #19804
Labels
Bug
Datetime
Datetime data dtype
Numeric Operations
Arithmetic, Comparison, and Logical operations
Timedelta
Timedelta data type
Timestamp and Timedelta comparisons against non-Timestamp/Timedelta-like others return False for
__eq__
, True for__ne__
and raiseTypeError
for inequalities. DatetimeIndex follows this convention in some cases, but there are paths that will end up raising instead of returning True/False. TimedeltaIndex doesn't follow this convention at all.Is the current hodge-podge intentional? If not I can put together a PR to ensure that
index.__cmp__(other) == np.array([index[n].__cmp__(other) for n in range(len(index))])
The text was updated successfully, but these errors were encountered: