DEP: Make np.insert and np.delete on 0d arrays with an axis an error#15802
Merged
eric-wieser merged 1 commit intonumpy:masterfrom Mar 24, 2020
Merged
DEP: Make np.insert and np.delete on 0d arrays with an axis an error#15802eric-wieser merged 1 commit intonumpy:masterfrom
np.insert and np.delete on 0d arrays with an axis an error#15802eric-wieser merged 1 commit intonumpy:masterfrom
Conversation
169cf75 to
7e3b2d8
Compare
Before this change, the following code worked: ``` >>> some_0d = np.array(1) >>> np.insert(some_0d, "some nonsense", 10, axis=0) array(10) >>> np.insert(some_0d, "some nonsense", 42, axis="some nonsense") array(42) ``` Now these raise AxisError and TypeError, respectively. `delete` is exactly the same.
7e3b2d8 to
f0e37e8
Compare
Member
Author
|
Googling for |
Member
|
Probably, I do not feel like bikeshedding on the release notes right now, so going to put this in when the tests are done. Thanks Eric... should have done this years long ago. |
Member
Author
This was referenced Mar 22, 2020
Member
Author
|
Since the other PRs are merged and have very similar structures of release note, may as well merge this one too. Release notes can always be cleaned up at release time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this change, the following code worked:
Now these raise AxisError and TypeError, respectively.
deleteis exactly the same.