diff options
author | warren <warren.weckesser@gmail.com> | 2021-10-20 18:00:38 -0400 |
---|---|---|
committer | warren <warren.weckesser@gmail.com> | 2021-10-20 18:00:38 -0400 |
commit | be11c06de7cf128c364c33dafbdecd2372f322e6 (patch) | |
tree | a0d67ab8791d4e7bba9668966f4f522689ef2120 /numpy/array_api/_creation_functions.py | |
parent | 5cb560616abe44774d897a80970775d2a26bb03b (diff) | |
download | numpy-be11c06de7cf128c364c33dafbdecd2372f322e6.tar.gz |
BUG: lib: Fix error raised by insert.
When `insert` is given a single out-of-bounds index in a
list, e.g.
np.insert([0, 1, 2], [99], [3, 4]) # 99 is out of bounds
a TypeError was being raised because of a bug in the formatting
of the message.
Before this change, the error is
TypeError: %i format: a number is required, not list
After, we get the expected
IndexError: index [99] is out of bounds for axis 0 with size 3
Diffstat (limited to 'numpy/array_api/_creation_functions.py')
0 files changed, 0 insertions, 0 deletions