Skip to content
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

BUG: IntervalTree construction fails for 32bit when n_elements > leaf_size #23440

Open
jschendel opened this issue Nov 1, 2018 · 2 comments
Open
Labels
32bit 32-bit systems Bug Interval Interval data type

Comments

@jschendel
Copy link
Member

jschendel commented Nov 1, 2018

Code Sample, a copy-pastable example if possible

See https://travis-ci.org/MacPython/pandas-wheels/jobs/448674095 for some specific test failures. The basic setup on a 32bit system is along the lines of:

In [2]: left = np.arange(5)

In [3]: tree = pd._libs.interval.IntervalTree(left, left+2, leaf_size=2)
---------------------------------------------------------------------------
TypeError: Cannot cast array data from dtype('int64') to dtype('int32') according to the rule 'safe'

xref #23353 (comment)

Problem description

IntervalTree construction fails for 32bit when n_elements > leaf_size.

Expected Output

I'd expect construction to be successful.

@jschendel jschendel added Interval Interval data type 32bit 32-bit systems labels Nov 1, 2018
@jreback
Copy link
Contributor

jreback commented Nov 1, 2018

@jschendel was #23442 meant to close this? or just a reminder issue?

@jschendel
Copy link
Member Author

This is a reminder issue; created it to give me an issue number to reference in the skipped tests of #23442, and to provide more detail in case anyone else sees the comment in the tests.

@mroeschke mroeschke added the Bug label Apr 3, 2020
johannes-mueller added a commit to boschresearch/pandas that referenced this issue May 31, 2022
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)
johannes-mueller added a commit to boschresearch/pandas that referenced this issue Jun 2, 2022
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)
johannes-mueller added a commit to boschresearch/pandas that referenced this issue Jun 2, 2022
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)
mroeschke pushed a commit that referenced this issue Jun 6, 2022
…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)
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this issue Jul 13, 2022
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
32bit 32-bit systems Bug Interval Interval data type
Projects
None yet
Development

No branches or pull requests

3 participants