ENH: unary functions overhaul; better input validation#148
ENH: unary functions overhaul; better input validation#148lucascolley merged 8 commits intodata-apis:mainfrom
Conversation
| yield asarray(1.0, dtype=d) | ||
|
|
||
| # Use the latest version of the standard so all functions are included | ||
| set_array_api_strict_flags(api_version="2024.12") |
There was a problem hiding this comment.
redundant with auto-applied fixture
| res = xp.where(cond, 1, x2) | ||
| assert res.device == device | ||
| res = xp.where(cond, x1, 2) | ||
| assert res.device == device |
There was a problem hiding this comment.
This and the following tests are great. I imaging we'll want to parrot them in array-api-tests at some point.
|
Note: this does not close #102 , as Python sneakily callls |
Exactly. |
|
@ev-br good to merge now? |
lucascolley
left a comment
There was a problem hiding this comment.
given the merge of gh-100, we may as well be consistent, so no worries from my side. Thanks both!
|
is the CI failure on main related to this PR? Or was that pre-existing? |
I'm on holiday and I can't bisect anything, but it looks to me like a scalar arg is being passed on 2023.12. If the issue is in array-api-strict or array-api-tests I can't debug from here, but I don't think it was caused by this PR. |
|
Was an array-api-tests glitch, fixed in data-apis/array-api-tests#375. |
xref #145
clip, andwherewhereis not an Arrayclip, andwherewhere