Skip to content

Update digital_rf_hdf5.py to allow reading 1 sample using DigitalRFReader.read_vector_raw#115

Closed
Sponge166 wants to merge 2 commits into
MITHaystack:masterfrom
Sponge166:master
Closed

Update digital_rf_hdf5.py to allow reading 1 sample using DigitalRFReader.read_vector_raw#115
Sponge166 wants to merge 2 commits into
MITHaystack:masterfrom
Sponge166:master

Conversation

@Sponge166

Copy link
Copy Markdown
Contributor

read_vector_raw would error if vector_length==1 and only one subchannel is read from, due to z.squeeze() returning a scalar when z contains one sample.

Sponge166 and others added 2 commits June 11, 2026 11:52
read_vector_raw would error if vector_length==1 and only one subchannel is read from, due to z.squeeze() returning a scalar when z contains one sample.
@ryanvolz

Copy link
Copy Markdown
Member

Thanks for noticing the bug and thanks for the PR! I'm partial to using np.atleast_1d to ensure we get back an array, so I've made that change, but otherwise I'll merge this as soon as the checks pass.

@Sponge166 Sponge166 closed this by deleting the head repository Jun 11, 2026
@Sponge166

Copy link
Copy Markdown
Contributor Author

oh oops lol, didn't know that would happen

@ryanvolz

Copy link
Copy Markdown
Member

It's alright, I can merge from my local copy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants