summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPierre de Buyl <pdebuyl@pdebuyl.be>2020-04-17 17:29:25 +0200
committerGitHub <noreply@github.com>2020-04-17 10:29:25 -0500
commit73e7d8e82efde0fbed5b888f31bd894d5d7d6936 (patch)
treee171c27f808d5f1a7c8ec4cea45927f2ae04b9ca /doc
parente51992aa22f9868ac4ab09608c5ba98cc93fb590 (diff)
downloadnumpy-73e7d8e82efde0fbed5b888f31bd894d5d7d6936.tar.gz
DOC: add note on flatten ordering in matlab page (#16001)
Add note on the ordering of matlab's ``x(:)`` vs NumPy ``x.flatten()`` fix #15837
Diffstat (limited to 'doc')
-rw-r--r--doc/source/user/numpy-for-matlab-users.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/source/user/numpy-for-matlab-users.rst b/doc/source/user/numpy-for-matlab-users.rst
index e53d1ca45..602192ecd 100644
--- a/doc/source/user/numpy-for-matlab-users.rst
+++ b/doc/source/user/numpy-for-matlab-users.rst
@@ -394,7 +394,8 @@ Linear Algebra Equivalents
* - ``y=x(:)``
- ``y = x.flatten()``
- - turn array into vector (note that this forces a copy)
+ - turn array into vector (note that this forces a copy). To obtain the
+ same data ordering as in Matlab, use ``x.flatten('F')``.
* - ``1:10``
- ``arange(1.,11.)`` or ``r_[1.:11.]`` or ``r_[1:10:10j]``