Skip to content

ENH: make __setitem__ raise on a device mismatch#209

Open
ev-br wants to merge 1 commit into
data-apis:mainfrom
ev-br:setitem_device
Open

ENH: make __setitem__ raise on a device mismatch#209
ev-br wants to merge 1 commit into
data-apis:mainfrom
ev-br:setitem_device

Conversation

@ev-br
Copy link
Copy Markdown
Member

@ev-br ev-br commented May 9, 2026

closes gh-207

@ev-br ev-br added this to the 2.6 milestone May 9, 2026
@ogrisel
Copy link
Copy Markdown

ogrisel commented May 15, 2026

LGTM: I checked that the current scikit-learn test suite passes against that branch of array-api-strict.

I also checked that changing scikit-learn code to allocate a result array with xp.empty without setting the expected device= kwarg make the tests fail early, when calling __setitem__ time, as expected.

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.

Raise on implicit device transfer in __setitem__

2 participants