diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2020-03-22 14:28:06 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2020-03-22 19:03:35 +0000 |
commit | f0e37e8088e55307ad33791a03cb3989f1b8118c (patch) | |
tree | 16c8362d6152fec120d6632bb7249b1c448f6b80 /numpy/lib/nanfunctions.py | |
parent | 90e644e7c668d52155e9a07b1032e71974e3dc7d (diff) | |
download | numpy-f0e37e8088e55307ad33791a03cb3989f1b8118c.tar.gz |
DEP: Make `np.insert` and `np.delete` on 0d arrays with an axis an error
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.
Diffstat (limited to 'numpy/lib/nanfunctions.py')
0 files changed, 0 insertions, 0 deletions