You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
order kwargs documentation in the ufunc API reference is confusing, especially around "if the inputs are F-contiguous and not also not C-contiguous, C-contiguous otherwise".
Current order kwargs description is:
Specifies the calculation iteration order/memory layout of the output array. Defaults to 'K'. 'C' means the output should be C-contiguous, 'F' means F-contiguous, 'A' means F-contiguous if the inputs are F-contiguous and not also not C-contiguous, C-contiguous otherwise, and 'K' means to match the element ordering of the inputs as closely as possible.
The description will be clear by rewriting like below. It replaces "F-contiguous and not also not C-contiguous" with "F-contiguous and not C-contiguous" and divides the long sentence into short.
Specifies the calculation iteration order/memory layout of the output array. Defaults to 'K'. 'C' means the output should be C-contiguous. 'F' means F-contiguous. 'A' means F-contiguous if the inputs are F-contiguous and not C-contiguous, C-contiguous otherwise. 'K' means to match the element ordering of the inputs as closely as possible.
My concerns about this documentation change idea are:
Whether "F-contiguous and not C-contiguous" reflects the actual API semantics or not
A clearer rephrase of "if the inputs are F-contiguous and not C-contiguous, C-contiguous otherwise". The last "C-contiguous, C-contiguous otherwise" looks a bit weird.
The concern (1) is important because it relates to the API semantics. I need a comment from those who understand how ufunc-compliant functions are implemented or know where/how the ufunc order kwargs behavior is decided.
The text was updated successfully, but these errors were encountered:
Issue with current documentation:
order
kwargs documentation in the ufunc API reference is confusing, especially around "if the inputs are F-contiguous and not also not C-contiguous, C-contiguous otherwise".Current
order
kwargs description is:Related links
https://github.com/numpy/numpy/blob/main/doc/source/reference/ufuncs.rst
https://numpy.org/doc/stable/reference/ufuncs.html
PR #3221
Idea or request for content:
The description will be clear by rewriting like below. It replaces "F-contiguous and not also not C-contiguous" with "F-contiguous and not C-contiguous" and divides the long sentence into short.
My concerns about this documentation change idea are:
The concern (1) is important because it relates to the API semantics. I need a comment from those who understand how ufunc-compliant functions are implemented or know where/how the ufunc
order
kwargs behavior is decided.The text was updated successfully, but these errors were encountered: