summaryrefslogtreecommitdiff
path: root/numpy/add_newdocs.py
diff options
context:
space:
mode:
authorMechCoder <manojkumarsivaraj334@gmail.com>2016-04-07 12:25:02 -0400
committerCharles Harris <charlesr.harris@gmail.com>2016-06-12 11:05:02 -0600
commit987cd0c2e6e2c8a73917e0bee19f869058c3b20f (patch)
tree7d8ba50d04f6e427963253253110a5040deb6649 /numpy/add_newdocs.py
parent76c27b5d2a28657062b2dcebba062f1941e4955f (diff)
downloadnumpy-987cd0c2e6e2c8a73917e0bee19f869058c3b20f.tar.gz
DOC: Fix order='A' docs of np.array
Diffstat (limited to 'numpy/add_newdocs.py')
-rw-r--r--numpy/add_newdocs.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py
index 16799887f..269c17adf 100644
--- a/numpy/add_newdocs.py
+++ b/numpy/add_newdocs.py
@@ -647,7 +647,7 @@ add_newdoc('numpy.core', 'broadcast', ('reset',
add_newdoc('numpy.core.multiarray', 'array',
"""
- array(object, dtype=None, copy=True, order=None, subok=False, ndmin=0)
+ array(object, dtype=None, copy=True, order='K', subok=False, ndmin=0)
Create an array.
@@ -668,14 +668,18 @@ add_newdoc('numpy.core.multiarray', 'array',
will only be made if __array__ returns a copy, if obj is a
nested sequence, or if a copy is needed to satisfy any of the other
requirements (`dtype`, `order`, etc.).
- order : {'C', 'F', 'A'}, optional
+ order : {'C', 'F', 'A', 'K'}, optional, default 'K'
Specify the order of the array. If order is 'C', then the array
will be in C-contiguous order (last-index varies the fastest).
If order is 'F', then the returned array will be in
Fortran-contiguous order (first-index varies the fastest).
- If order is 'A' (default), then the returned array may be
- in any order (either C-, Fortran-contiguous, or even discontiguous),
- unless a copy is required, in which case it will be C-contiguous.
+ If ``copy=False``, and order is set to 'A' or 'K', nothing
+ is ensured about the memory layout of the output array.
+ If ``copy=True`` and
+ - Order is 'A', then the order of the output is C
+ unless the input is fortran-ordered.
+ - Order is 'K', then the memory layout of the returned array is
+ kept as close as possible to the original array.
subok : bool, optional
If True, then sub-classes will be passed-through, otherwise
the returned array will be forced to be a base-class array (default).