Skip to content

Conversation

nbidler
Copy link

@nbidler nbidler commented Aug 15, 2025

See #28247. Changed description of options for parameter order - made explicit that 'C' and 'F' give contiguous results, and 'A' will give results equivalent to 'F' if the input is Fortran-contiguous OR non-contiguous, but if the desired output is non-contiguous Fortran-style then the user also needs to set copy to True.

'C' gives a row-major layout (C-style),
'F' gives a column-major layout (Fortran-style).
Both 'C' and 'F' ensure a contiguous result.
'A' (any) is equivalent to 'F' if input a is non-contiguous or Fortran-contiguous, otherwise, it is equivalent to 'C'. If the desired output is a non-contiguous Fortran-style ndarray, the user should set ``copy`` to ``True`` to ensure this.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please just add a minimal thing that 'A', like 'K', will not copy to ensure a contiguous output?
Yeah, maybe still confusing, so mentioning the opposite that 'C' and 'F' will copy if needed is maybe clarifying.

'A' (any) means 'F' if `a` is Fortran contiguous, 'C' otherwise
'K' (keep) preserve input order
Defaults to 'K'.
The memory layout of the output ndarray. The output of 'A' and 'K' depend on the memory layout of input a.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about simplifying this to

Suggested change
The memory layout of the output ndarray. The output of 'A' and 'K' depend on the memory layout of input a.
The memory layout of the output.

and move the explanation of the input-dependence of A and K to the individual explanations of A and K below?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants