diff options
author | Pierre de Buyl <pdebuyl@pdebuyl.be> | 2020-04-17 17:29:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 10:29:25 -0500 |
commit | 73e7d8e82efde0fbed5b888f31bd894d5d7d6936 (patch) | |
tree | e171c27f808d5f1a7c8ec4cea45927f2ae04b9ca /doc | |
parent | e51992aa22f9868ac4ab09608c5ba98cc93fb590 (diff) | |
download | numpy-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.rst | 3 |
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]`` |