Skip to content

ENH: cupy: make isin accept int scalars#396

Merged
ev-br merged 1 commit intodata-apis:mainfrom
ev-br:cupy_isin_scalars
Feb 24, 2026
Merged

ENH: cupy: make isin accept int scalars#396
ev-br merged 1 commit intodata-apis:mainfrom
ev-br:cupy_isin_scalars

Conversation

@ev-br
Copy link
Member

@ev-br ev-br commented Feb 24, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 24, 2026 14:11
@ev-br ev-br added this to the 1.14 milestone Feb 24, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a wrapper function for CuPy's isin function to accept Python scalar values, which the native CuPy implementation does not support. The wrapper converts scalar arguments to CuPy arrays using cp.asarray() before calling the underlying cp.isin() function.

Changes:

  • Added isin wrapper function in cupy/_aliases.py to convert int scalars to arrays
  • Exported isin in the module's __all__ list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ev-br ev-br merged commit b522655 into data-apis:main Feb 24, 2026
36 of 38 checks passed
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.

2 participants