Add transition code for returning view when selecting subset of fields#350
Add transition code for returning view when selecting subset of fields#350teoliphant merged 8 commits intonumpy:masterfrom
Conversation
|
I don't remember seeing this go by on the list -- did I miss the discussion? |
|
Agree with njsmith, this needs some discussion on the list before it goes in. We also need to decide if it should be in 1.7 or 1.8. |
|
It looks like folks on the list agree this should go into 1.7 with the array diagonal change. |
There was a problem hiding this comment.
The numpy.diagonal patch added a discussion of this to the docs for numpy.diagonal, that's what this note is referring to. Just telling people to check the structured array docs isn't useful unless there's actually some explanation of this there... and honestly I'm not even sure where the "structured array docs" are, that's pretty vague. People who get this warning message will want a much more specific explanation of what they need to do.
|
Also, this change needs tests. See test_multiarray.py:test_diagonal_deprecation for an example. (Though you probably don't have to be so thorough, since that test is also testing the WARN_ON_WRITE mechanism itself.) |
|
Also, you should add an explanation of the change to doc/release/1.7.0-notes.rst |
|
All good points :) As far as documentation, I think I'll add something to the arrays.indexing reference page about indexing with multiple field names for record arrays (currently it only mentions indexing with a single field name). I'll add a note here about returning a copy being deprecated in 1.7. |
There was a problem hiding this comment.
This was just changed to a FutureWarning --- doc needs to be updated...
Add ability to get view when selecting subset of fields in a struct array, for numpy 1.8.0. Currently a copy is still returned - set WARN_ON_WRITE flag which will be removed in a future version of numpy.
Change WARN_ON_WRITE Deprecation Warning to include returning a copy when selecting muultiple fields of a structured array.
- add tests for record array indexing with multiple field names - add tests for DeprecationWarning when writing to array returned by record array indexing with multiple field names
Add transition code for returning view when selecting subset of fields
(Broken by PR numpy#350.) Should be applied to maintenance/1.7.x as well.
|
This broke something: http://projects.scipy.org/numpy/ticket/2187 |
(Broken by PR numpy#350.) Should be applied to maintenance/1.7.x as well.
feat: Add vqdmull[h|s][_high]_[s16|s32]
Add transition code for returning a view when selecting a subset of fields in a structured array (e.g. array[ ['f0', 'f2'] ]. Currently a copy is still returned - the WARN_ON_WRITE flag is set so a deprecation warning is triggered when writing to this copy.
Also update the WARN_ON_WRITE deprecation warning to include the above scenario. Currently the warning message only mentions the diagonal function.