diff options
author | hklemm <hanno.klemm@maerskoil.com> | 2013-07-28 23:07:23 +0200 |
---|---|---|
committer | hklemm <hanno.klemm@maerskoil.com> | 2013-07-28 23:07:23 +0200 |
commit | c0a61b2e16b6909df5d406087ed0fd923d9edfbd (patch) | |
tree | e2f8572d1af51076b41ab72a21bb3b336bda35a2 /numpy/doc/structured_arrays.py | |
parent | 895866d337fedb2018a076002ebb9ea49fa397f3 (diff) | |
download | numpy-c0a61b2e16b6909df5d406087ed0fd923d9edfbd.tar.gz |
Update structured_arrays.py
The behaviour documented did not match the actual behaviour of numpy. Explanation changed and the code example updated.
Diffstat (limited to 'numpy/doc/structured_arrays.py')
-rw-r--r-- | numpy/doc/structured_arrays.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/numpy/doc/structured_arrays.py b/numpy/doc/structured_arrays.py index be3d5cc7d..304184d0d 100644 --- a/numpy/doc/structured_arrays.py +++ b/numpy/doc/structured_arrays.py @@ -191,12 +191,11 @@ Notice that `x` is created with a list of tuples. :: (1.0, [[2.0, 6.0], [2.0, 6.0]])], dtype=[('x', '<f4'), ('value', '<f4', (2, 2))]) -Notice that the fields are always returned in the same order regardless of -the sequence they are asked for. :: +The fields are returned in the order they are asked for.:: >>> x[['y','x']] - array([(1.5, 2.5), (3.0, 4.0), (1.0, 3.0)], - dtype=[('x', '<f4'), ('y', '<f4')]) + array([(2.5, 1.5), (4.0, 3.0), (3.0, 1.0)], + dtype=[('y', '<f4'), ('x', '<f4')]) Filling structured arrays ========================= |