Skip to content

Conversation

@eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Mar 22, 2020

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.

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.
@eric-wieser
Copy link
Member Author

Googling for in the future the special handling of scalars will be removed gives no results other than clones of numpy, so it looks like no one ever ran into this deprecation anyway.

@seberg
Copy link
Member

seberg commented Mar 22, 2020

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.

@eric-wieser
Copy link
Member Author

Perhaps worth leaving for a few days for someone with release note opinions like @charris or @rgommers to chime in. It's not like anything is blocked by this PR.

@eric-wieser
Copy link
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.

@eric-wieser eric-wieser merged commit 7d0b3ef into numpy:master Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants