array-api icon indicating copy to clipboard operation
array-api copied to clipboard

Rationale behind not setting positional arguments to positional only for few functions.

Open RickSanchezStoic opened this issue 3 years ago • 3 comments

Functions like full and ones and maybe others don't have positional only arguments in their definition. I wanted to know the reason behind this. https://data-apis.org/array-api/latest/API_specification/creation_functions.html?highlight=positional

RickSanchezStoic avatar Sep 07 '22 06:09 RickSanchezStoic

This was changed in https://github.com/data-apis/array-api/pull/167 and stemmed from the following issue: https://github.com/data-apis/array-api/issues/85.

kgryte avatar Sep 07 '22 09:09 kgryte

Thanks, @kgryte! Do you think there should be some detail about this in the official documentation to avoid confusion in the future?

RickSanchezStoic avatar Sep 07 '22 13:09 RickSanchezStoic

Agreed. We have an open issue to consolidate some of the spec guidance (see https://github.com/data-apis/array-api/issues/223), and, as part of addressing the concerns described there, can add an explainer regarding exceptions to the general rule.

kgryte avatar Sep 08 '22 06:09 kgryte