-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
Closed
Labels
BugDatetimeDatetime data dtypeDatetime data dtypeNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operationsTimedeltaTimedelta data typeTimedelta data type
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))])
Metadata
Metadata
Assignees
Labels
BugDatetimeDatetime data dtypeDatetime data dtypeNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operationsTimedeltaTimedelta data typeTimedelta data type