[Numpy-svn] [numpy/numpy] de84ba: MAINT: Add deprecation warning to multi-field view...
GitHub
noreply at github.com
Sat Sep 24 19:23:49 EDT 2016
Branch: refs/heads/master
Home: https://github.com/numpy/numpy
Commit: de84ba263abc8472f37aa8e08a26da84cdbd0d2a
https://github.com/numpy/numpy/commit/de84ba263abc8472f37aa8e08a26da84cdbd0d2a
Author: Allan Haldane <allan.haldane at gmail.com>
Date: 2016-09-24 (Sat, 24 Sep 2016)
Changed paths:
M doc/release/1.12.0-notes.rst
M numpy/core/src/multiarray/convert.c
M numpy/core/src/multiarray/dtype_transfer.c
M numpy/core/src/multiarray/mapping.c
M numpy/core/src/multiarray/methods.c
M numpy/core/tests/test_multiarray.py
M numpy/core/tests/test_nditer.py
M numpy/core/tests/test_records.py
M numpy/ma/tests/test_core.py
Log Message:
-----------
MAINT: Add deprecation warning to multi-field views/assignment
Behavior of multi-field indexes will change in 1.13: Multi-field indexes
will return a view (not a copy) and assignment between structures with
non-identical fieldnames occurs "by position" (not "by fieldname"):
>>> a = zeros(10, dtype=[('x', 'i8'), ('y', 'i8'), ('z', 'i8')])
>>> a[['x', 'z']].view('i4') # Deprecation warning for multifield view
>>> b = ones(10, dtype=[('y', 'i4'), ('x', 'f4')])
>>> a[:] = b # Deprecation warning for multifield assignment
Commit: a17e905faa20fcdd1b3f039bceef6efa19671bb3
https://github.com/numpy/numpy/commit/a17e905faa20fcdd1b3f039bceef6efa19671bb3
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2016-09-24 (Sat, 24 Sep 2016)
Changed paths:
M doc/release/1.12.0-notes.rst
M numpy/core/src/multiarray/convert.c
M numpy/core/src/multiarray/dtype_transfer.c
M numpy/core/src/multiarray/mapping.c
M numpy/core/src/multiarray/methods.c
M numpy/core/tests/test_multiarray.py
M numpy/core/tests/test_nditer.py
M numpy/core/tests/test_records.py
M numpy/ma/tests/test_core.py
Log Message:
-----------
Merge pull request #6054 from ahaldane/warnview
WIP: MAINT: Add deprecation warning to views of multi-field indexes
Compare: https://github.com/numpy/numpy/compare/a6574b2f080e...a17e905faa20
More information about the Numpy-svn
mailing list