-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: infinite recursion loop when inf interval bounds lead to inf pivot values in an IntervalTree #46658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Attempts to fix pandas-dev#46658. When the pivot of an IntervalTree becomes ±inf the construction of the IntervalTree comes to an infinite loop recursion. This patch tries to fix that by catching those cases and set the pivot to a reasonable value.
Attempts to fix pandas-dev#46658. When the pivot of an IntervalTree becomes ±inf the construction of the IntervalTree comes to an infinite loop recursion. This patch tries to fix that by catching those cases and set the pivot to a reasonable value.
Attempts to fix pandas-dev#46658. When the pivot of an IntervalTree becomes ±inf the construction of the IntervalTree comes to an infinite loop recursion. This patch tries to fix that by catching those cases and set the pivot to a reasonable value.
Attempts to fix pandas-dev#46658. When the pivot of an IntervalTree becomes ±inf the construction of the IntervalTree comes to an infinite loop recursion. This patch tries to fix that by catching those cases and set the pivot to a reasonable value.
I addressed this issue in a PR. I would probably need some help with the following questions
It would be helpful to have some discussion about that. |
Attempts to fix pandas-dev#46658. When the pivot of an IntervalTree becomes ±inf the construction of the IntervalTree comes to an infinite loop recursion. This patch tries to fix that by catching those cases and set the pivot to a reasonable value.
Attempts to fix pandas-dev#46658. When the pivot of an IntervalTree becomes ±inf the construction of the IntervalTree comes to an infinite loop recursion. This patch tries to fix that by catching those cases and set the pivot to a reasonable value.
Attempts to fix pandas-dev#46658. When the pivot of an IntervalTree becomes ±inf the construction of the IntervalTree comes to an infinite loop recursion. This patch tries to fix that by catching those cases and set the pivot to a reasonable value.
Attempts to fix pandas-dev#46658. When the pivot of an IntervalTree becomes ±inf the construction of the IntervalTree comes to an infinite loop recursion. This patch tries to fix that by catching those cases and set the pivot to a reasonable value.
Attempts to fix pandas-dev#46658. When the pivot of an IntervalTree becomes ±inf the construction of the IntervalTree comes to an infinite loop recursion. This patch tries to fix that by catching those cases and set the pivot to a reasonable value. Note that the tests are skipped on 32-bit systems (see pandas-dev#23440)
We use integer indices to address the interval index for the haigh diagram and later replace it by the interval index. Signed-off-by: Johannes Mueller <johannes.mueller4@de.bosch.com>
Merge in FMO/pylife from bugfix/workaround-pandas-46658 to develop * commit '93bc0846c8202d4191ac625d321623ff3831f034': Work around pandas-dev/pandas#46658
Attempts to fix pandas-dev#46658. When the pivot of an IntervalTree becomes ±inf the construction of the IntervalTree comes to an infinite loop recursion. This patch tries to fix that by catching those cases and set the pivot to a reasonable value. Note that the tests are skipped on 32-bit systems (see pandas-dev#23440)
Attempts to fix pandas-dev#46658. When the pivot of an IntervalTree becomes ±inf the construction of the IntervalTree comes to an infinite loop recursion. This patch tries to fix that by catching those cases and set the pivot to a reasonable value. Note that the tests are skipped on 32-bit systems (see pandas-dev#23440)
…46664) Attempts to fix #46658. When the pivot of an IntervalTree becomes ±inf the construction of the IntervalTree comes to an infinite loop recursion. This patch tries to fix that by catching those cases and set the pivot to a reasonable value. Note that the tests are skipped on 32-bit systems (see #23440)
…andas-dev#46664) Attempts to fix pandas-dev#46658. When the pivot of an IntervalTree becomes ±inf the construction of the IntervalTree comes to an infinite loop recursion. This patch tries to fix that by catching those cases and set the pivot to a reasonable value. Note that the tests are skipped on 32-bit systems (see pandas-dev#23440)
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
The above code runs into an infinite recursion loop. The reason for this is, that
self.pivot
in that case is set to-inf
. Then the subset for thenew_child_node()
is the same set as for the parent node. That leads to an infinite recursion.Observed output:
Expected Behavior
Expected output
Installed Versions
pandas : 1.4.1
numpy : 1.19.5
pytz : 2021.3
dateutil : 2.8.2
pip : 21.2.4
setuptools : 58.0.4
Cython : 0.29.26
pytest : 6.2.5
hypothesis : 6.35.0
sphinx : 4.3.2
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.3
IPython : 7.31.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
fsspec : 2022.01.0
gcsfs : None
matplotlib : 3.5.1
numba : 0.55.0
numexpr : None
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.7.3
sqlalchemy : None
tables : None
tabulate : None
xarray : 0.20.2
xlrd : None
xlwt : None
zstandard : 0.16.0
The text was updated successfully, but these errors were encountered: