diff options
author | Allan Haldane <allan.haldane@gmail.com> | 2018-01-30 19:15:54 -0500 |
---|---|---|
committer | Allan Haldane <allan.haldane@gmail.com> | 2018-10-31 12:22:21 -0400 |
commit | f1fba70edd1829c64e3290fa6b1a20d01e9d9674 (patch) | |
tree | 9d60664d69bb1fec9fae6a01dbdfe8d47919e4e7 /numpy/doc/structured_arrays.py | |
parent | e9c631825df7b0a9c969dbfcbaf19d975e4afdde (diff) | |
download | numpy-f1fba70edd1829c64e3290fa6b1a20d01e9d9674.tar.gz |
ENH: add multi-field assignment helpers in np.lib.recfunctions
Adds helper functions for the copy->view transition for multi-field
indexes. Adds `structured_to_unstructured`, `apply_along_fields`,
`assign_fields_by_name`, `require_fields`.
Diffstat (limited to 'numpy/doc/structured_arrays.py')
-rw-r--r-- | numpy/doc/structured_arrays.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/doc/structured_arrays.py b/numpy/doc/structured_arrays.py index ab97c5df6..42711a7c0 100644 --- a/numpy/doc/structured_arrays.py +++ b/numpy/doc/structured_arrays.py @@ -443,6 +443,15 @@ behavior since Numpy 1.7. >>> repack_fields(a[['a','c']]).view('i8') # supported 1.15 and 1.16 array([0, 0, 0]) + The :module:`numpy.lib.recfunctions` module has other new methods + introduced in numpy 1.16 to help users account for this change. These are + :func:`numpy.lib.recfunctions.structured_to_unstructured`, + :func:`numpy.lib.recfunctions.unstructured_to_structured`, + :func:`numpy.lib.recfunctions.apply_along_fields`, + :func:`numpy.lib.recfunctions.assign_fields_by_name`, and + :func:`numpy.lib.recfunctions.require_fields`. + + Assigning to an array with a multi-field index will behave the same in Numpy 1.15 and Numpy 1.16. In both versions the assignment will modify the original array:: |