Skip to content

BUG: Fix out-of-bound minimum offset for in1d table method#26930

Merged
charris merged 1 commit into
numpy:mainfrom
seberg:issue-26922
Jul 13, 2024
Merged

BUG: Fix out-of-bound minimum offset for in1d table method#26930
charris merged 1 commit into
numpy:mainfrom
seberg:issue-26922

Conversation

@seberg
Copy link
Copy Markdown
Member

@seberg seberg commented Jul 13, 2024

We could always use ar2.dtype, but we want intp anyway, so that is nicer. But if the minimum value doesn't fit intp, NumPy would complain (it may even guaranteed to work to force-cast, but...)

So just try to use intp, but if that doesn't work use ar2.dtype which must work, but means we'll have to cast once more (even if that cast is probably just a view in principle).

Closes gh-26922

We could always use ar2.dtype, but we want intp anyway, so that
is nicer.  But if the minimum value doesn't fit intp, NumPy would
complain (it may even guaranteed to work to force-cast,
but...)

So just try to use intp, but if that doesn't work use ar2.dtype
which must work, but means we'll have to cast once more (even if
that cast is probably just a view in principle).

Closes numpygh-26922
@seberg seberg added the 09 - Backport-Candidate PRs tagged should be backported label Jul 13, 2024
@seberg seberg added this to the 2.0.1 release milestone Jul 13, 2024
@charris charris merged commit 1a357f0 into numpy:main Jul 13, 2024
@charris
Copy link
Copy Markdown
Member

charris commented Jul 13, 2024

Thanks Sebastian.

@seberg seberg deleted the issue-26922 branch July 13, 2024 18:16
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: np.isin() gives OverflowError: Python int too large to convert to C long when using a np.uint64 np.array when using numpy==2.0.0

2 participants