Skip to content

ENH: allow python scalars in the 2nd argument of searchsorted#9512

Merged
seberg merged 3 commits intocupy:mainfrom
ev-br:searchsorted_scalar_x2
Dec 10, 2025
Merged

ENH: allow python scalars in the 2nd argument of searchsorted#9512
seberg merged 3 commits intocupy:mainfrom
ev-br:searchsorted_scalar_x2

Conversation

@ev-br
Copy link
Copy Markdown
Contributor

@ev-br ev-br commented Dec 8, 2025

The upcoming Array API revision 2025.12 will allow the second argument of searchsorted to be a python scalar, cf
data-apis/array-api#982, so here's a matching proposal for CuPy.

The upcoming Array API revision 2025.12 will allow the second argument of
searchsorted to be a python scalar, cf
data-apis/array-api#982
@ev-br ev-br force-pushed the searchsorted_scalar_x2 branch from 5c46b61 to 0dfd2ee Compare December 8, 2025 12:07
@ev-br ev-br force-pushed the searchsorted_scalar_x2 branch from 0dfd2ee to 6867e2d Compare December 8, 2025 12:15
@seberg seberg self-assigned this Dec 9, 2025
Copy link
Copy Markdown
Member

@seberg seberg left a comment

Choose a reason for hiding this comment

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

Thanks @ev-br. Not sure if a kernel launch with a scalar would be better, but this is should be fine.

@seberg
Copy link
Copy Markdown
Member

seberg commented Dec 9, 2025

/test mini

@ev-br
Copy link
Copy Markdown
Contributor Author

ev-br commented Dec 9, 2025

Not sure if a kernel launch with a scalar would be better

FWIW I thought about it. My impression is it will complicate the kernel without giving tangible speed-ups. Happy to implement it if there are strong reasons to though.

@seberg
Copy link
Copy Markdown
Member

seberg commented Dec 10, 2025

Thanks @ev-br, seems safe to me, so let me put it in. If we someone wants a follow-up, I am happy to do that.

@seberg seberg merged commit 39e76ff into cupy:main Dec 10, 2025
47 checks passed
@kmaehashi kmaehashi added this to the v14.0.0rc1 milestone Dec 18, 2025
@kmaehashi kmaehashi added cat:enhancement Improvements to existing features prio:medium labels Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:enhancement Improvements to existing features prio:medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants