From f31f12afa6fcbc852dfc57b34dd701d7b4145203 Mon Sep 17 00:00:00 2001 From: Neal C Date: Tue, 14 Jul 2020 00:44:56 -0700 Subject: DOC: Add explanation of 'K' and 'A' layout options to 'asarray*' functions (#16811) * DOC: update parameter choices for asarray, asarray_contiguous, asarray_chkfinite converters Co-authored-by: sun --- numpy/lib/function_base.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'numpy/lib/function_base.py') diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 42ea8c7a7..6ea9cc4de 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -431,10 +431,13 @@ def asarray_chkfinite(a, dtype=None, order=None): of lists and ndarrays. Success requires no NaNs or Infs. dtype : data-type, optional By default, the data-type is inferred from the input data. - order : {'C', 'F'}, optional - Whether to use row-major (C-style) or - column-major (Fortran-style) memory representation. - Defaults to 'C'. + 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'. Returns ------- -- cgit v1.2.1