Skip to content
Open
27 changes: 15 additions & 12 deletions numpy/_core/_add_newdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -967,12 +967,13 @@
dtype : data-type, optional
By default, the data-type is inferred from the input data.
order : {'C', 'F', 'A', 'K'}, optional
Memory layout. 'A' and 'K' depend on the order of input array a.
'C' row-major (C-style),
'F' column-major (Fortran-style) memory representation.
'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.
'C' gives a row-major layout (C-style),
'F' gives a column-major layout (Fortran-style).
'C' and 'F' will copy if needed to ensure the output format.
'A' (any) is equivalent to 'F' if input a is non-contiguous or Fortran-contiguous, otherwise, it is equivalent to 'C'.
Unlike 'C' or 'F', 'A' does not ensure that the result is contiguous.
'K' (keep) is the default and preserves the input order for the output.
device : str, optional
The device on which to place the created array. Default: ``None``.
For Array-API interoperability only, so must be ``"cpu"`` if passed.
Expand Down Expand Up @@ -1059,12 +1060,14 @@
dtype : data-type, optional
By default, the data-type is inferred from the input data.
order : {'C', 'F', 'A', 'K'}, optional
Memory layout. 'A' and 'K' depend on the order of input array a.
'C' row-major (C-style),
'F' column-major (Fortran-style) memory representation.
'A' (any) means 'F' if `a` is Fortran contiguous, 'C' otherwise
'K' (keep) preserve input order
Defaults to 'C'.
The memory layout of the output.
'C' gives a row-major layout (C-style),
'F' gives a column-major layout (Fortran-style).
'C' and 'F' will copy if needed to ensure the output format.
'A' (any) is equivalent to 'F' if input a is non-contiguous or Fortran-contiguous, otherwise, it is equivalent to 'C'.
Unlike 'C' or 'F', 'A' does not ensure that the result is contiguous.
'K' (keep) preserves the input order for the output.
'C' is the default.
device : str, optional
The device on which to place the created array. Default: ``None``.
For Array-API interoperability only, so must be ``"cpu"`` if passed.
Expand Down
15 changes: 9 additions & 6 deletions numpy/lib/_function_base_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,12 +613,15 @@ def asarray_chkfinite(a, dtype=None, order=None):
dtype : data-type, optional
By default, the data-type is inferred from the input data.
order : {'C', 'F', 'A', 'K'}, optional
Memory layout. 'A' and 'K' depend on the order of input array a.
'C' row-major (C-style),
'F' column-major (Fortran-style) memory representation.
'A' (any) means 'F' if `a` is Fortran contiguous, 'C' otherwise
'K' (keep) preserve input order
Defaults to 'C'.
The memory layout of the output.
'C' gives a row-major layout (C-style),
'F' gives a column-major layout (Fortran-style).
'C' and 'F' will copy if needed to ensure the output format.
'A' (any) is equivalent to 'F' if input a is non-contiguous or
Fortran-contiguous, otherwise, it is equivalent to 'C'.
Unlike 'C' or 'F', 'A' does not ensure that the result is contiguous.
'K' (keep) preserves the input order for the output.
'C' is the default.

Returns
-------
Expand Down