Closed
Description
Timestamp and Timedelta comparisons against non-Timestamp/Timedelta-like others return False for __eq__
, True for __ne__
and raise TypeError
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))])