Repository navigation
Apply the HDF5 buffer channel selection once in BaseRawWithBufferApiIO - #1983
Open
Arthur031221 wants to merge 1 commit into
Open
Arthur031221 wants to merge 1 commit into
Arthur031221 wants to merge 1 commit into
Conversation
For HDF5 buffers, _get_analogsignal_chunk applied _stream_buffer_slice in the HDF5 branch and then again in the shared code after the if/elif chain. The second selection ran on the array the first one had already narrowed. That is harmless for None and slice(None), but slice(0, -1), an index array or a boolean mask returned too few columns or raised IndexError. Remove the selection in the HDF5 branch. Add a test that reads an HDF5 dataset through BaseRawWithBufferApiIO for both time_axis values and several selections.
This branch has not been deployed
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.
For HDF5 buffers,
BaseRawWithBufferApiIO._get_analogsignal_chunkapplies_stream_buffer_slicein the HDF5 branch and then again in the shared code after the if/elif chain. The second selection runs on the array the first one already narrowed. That is harmless forNoneandslice(None), butslice(0, -1), an index array or a boolean mask returns too few columns or raisesIndexError. This removes the first selection.MaxwellRawIOis the only reader with an HDF5 buffer description and it setsslice(None)for every stream, so master does not hit this today. #1909 needs it to fix the Maxwell load failure in #1702, and I split it out of that PR as suggested there.The new
test_baserawio.pyreads an HDF5 dataset throughBaseRawWithBufferApiIOfor bothtime_axisvalues and five selections. Without the change 6 subtests fail, with it all pass:pytest -q neo/test/rawiotest/test_baserawio.py.Assisted by Claude/Codex.