-
I've noticed that positional-only and keyword-only arguments are used in the standard. However, as far as I can tell, the unit tests do not assert that failures occur if these positional or keyword arguments are called incorrectly. For example, Ivy's ceil implementation can be called like so:
without raising an error, which should not be permitted by the standard. However, the Array API unit tests are still passing. We have opted to remove position-only and keyword-only arguments to reduce user restrictions, but we could pivot on this decision. I'm curious, will you treat frameworks which remove all |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @djl11, thanks for the question.
Good question. All implementations may, and are likely to, offer additional functionality beyond what's in the standard. That does not break compliance with the standard. However, if the users is using those extensions then of course their code may no longer be portable. To give an example, staying with
We've attempted to strike a balance; when there are two reasonable spellings then we don't enforce positional/keyword-only, when there's clearly one preferred way to spell something then we added it.
I'd say it's certainly not a priority and if it is added then it should be well separated from other tests, because many libraries will not be adding |
Beta Was this translation helpful? Give feedback.
Hi @djl11, thanks for the question.
Good question. All implementations may, and are likely to, offer additional functionality beyond what's in the standard. That does not break compliance with the standard. However, if the users is using those extensions then of course their code may no longer be portable.
To give an example, staying with
ceil
:ceil(x: array, /)
. User can therefore write, for an inputx
, only one form:ceil(x)
./
then a user can write two forms:ceil(x)
andceil(x=x)
. The latter is both not guaranteed to…