Skip to content

BUG: honor invert in isin - #256

Open
AryanRG wants to merge 1 commit into
data-apis:mainfrom
AryanRG:fix/isin-inverted-membership-mask
Open

AryanRG wants to merge 1 commit into
data-apis:mainfrom
AryanRG:fix/isin-inverted-membership-mask

Conversation

@AryanRG

@AryanRG AryanRG commented Dec 1, 2026

Copy link
Copy Markdown

xp.isin(xp.asarray([1, 2, 3]), xp.asarray([1, 3]), invert=True) returns [True, False, True]. The expected exclusion mask is [False, True, False].

Pass invert through to NumPy and add a regression that checks the mask for both matching and missing values. Array API 2025.12 specification

The regression fails on main. With the fix, all 792 repository tests pass on Python 3.13 and NumPy 2.4.4, and Ruff passes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant