File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ cdef class _Timestamp(ABCTimestamp):
324
324
elif other is NaT:
325
325
return op == Py_NE
326
326
elif is_datetime64_object(other):
327
- ots = _Timestamp._from_dt64 (other)
327
+ ots = Timestamp (other)
328
328
elif PyDateTime_Check(other):
329
329
if self .nanosecond == 0 :
330
330
val = self .to_pydatetime()
Original file line number Diff line number Diff line change 12
12
13
13
14
14
class TestTimestampComparison :
15
+ def test_compare_non_nano_dt64 (self ):
16
+ # don't raise when converting dt64 to Timestamp in __richcmp__
17
+ dt = np .datetime64 ("1066-10-14" )
18
+ ts = Timestamp (dt )
19
+
20
+ assert dt == ts
21
+
15
22
def test_comparison_dt64_ndarray (self ):
16
23
ts = Timestamp ("2021-01-01" )
17
24
ts2 = Timestamp ("2019-04-05" )
You can’t perform that action at this time.
0 commit comments