-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type error in h5py when data_array index exceeds number of items in data_array #299
Comments
Good idea. A nicer error from nixpy would be more informative. Thanks for the suggestion. |
achilleas-k
added a commit
to achilleas-k/nixpy
that referenced
this issue
Jul 11, 2018
H5Py throws ValueError for out-of-bounds indexing. We catch it and throw IndexError instead, reusing the error message from H5Py. This also makes indexing more flexible. Slices now work the same as in numpy, so no slice is ever out-of-bounds. The corresponding test has been updated accordingly. This is an updated version of PR G-Node#303, which was a fix for G-Node#299.
achilleas-k
added a commit
to achilleas-k/nixpy
that referenced
this issue
Jul 12, 2018
H5Py throws ValueError for out-of-bounds indexing. We catch it and throw IndexError instead, reusing the error message from H5Py. This also makes indexing more flexible. Slices now work the same as in numpy, so no slice is ever out-of-bounds. The corresponding test has been updated accordingly. This is an updated version of PR G-Node#303, which was a fix for G-Node#299.
achilleas-k
added a commit
to achilleas-k/nixpy
that referenced
this issue
Jul 12, 2018
H5Py throws ValueError for out-of-bounds indexing. We catch it and throw IndexError instead, reusing the error message from H5Py. This also makes indexing more flexible. Slices now work the same as in numpy, so no slice is ever out-of-bounds. The corresponding test has been updated accordingly. This is an updated version of PR G-Node#303, which was a fix for G-Node#299.
achilleas-k
added a commit
to achilleas-k/nixpy
that referenced
this issue
Jul 12, 2018
H5Py throws ValueError for out-of-bounds indexing. We catch it and throw IndexError instead, reusing the error message from H5Py. This also makes indexing more flexible. Slices now work the same as in numpy, so no slice is ever out-of-bounds. The corresponding test has been updated accordingly. This is an updated version of PR G-Node#303, which was a fix for G-Node#299.
achilleas-k
added a commit
to achilleas-k/nixpy
that referenced
this issue
Jul 12, 2018
H5Py throws ValueError for out-of-bounds indexing. We catch it and throw IndexError instead, reusing the error message from H5Py. This also makes indexing more flexible. Slices now work the same as in numpy, so no slice is ever out-of-bounds. The corresponding test has been updated accordingly. This is an updated version of PR G-Node#303, which was a fix for G-Node#299.
achilleas-k
added a commit
to achilleas-k/nixpy
that referenced
this issue
Jan 18, 2019
H5Py throws ValueError for out-of-bounds indexing. We catch it and throw IndexError instead, reusing the error message from H5Py. This also makes indexing more flexible. Slices now work the same as in numpy, so no slice is ever out-of-bounds. The corresponding test has been updated accordingly. This is an updated version of PR G-Node#303, which was a fix for G-Node#299.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nixpy does not throw an exception when the index in a data_array call exceeds the number of items in the data_array. Instead it causes an error in h5py when the number of items retrieved from file does not match the number of expected items.
Maybe nixpy could instead check if the index is out of range before calling h5py.
The text was updated successfully, but these errors were encountered: