BUG: Timestamp array comparison may raise RecursionError · Issue #15183 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
Code Sample, a copy-pastable example if possible
import numpy as np import pandas as pd
n1 = np.array([pd.Timestamp('2011-01-01 00:00:00'), pd.Timestamp('2011-01-03 00:00:00-0500', tz='US/Eastern')], dtype=object)
pd.Timestamp('2011-01-03 00:00:00-0500', tz='US/Eastern') == n1
RecursionError: maximum recursion depth exceeded
Problem description
Related to #12780. This issue causes datetime-like .replace
to raise SystemError
. Recursion is caused by this line:
https://github.com/pandas-dev/pandas/blob/master/pandas/tslib.pyx#L1040
Expected Output
raises TypeError
.
Output of pd.show_versions()
# Paste the output here pd.show_versions() here