Skip to content
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

Allow random access in HDF5TableReader #2567

Open
maxnoe opened this issue Jun 25, 2024 · 1 comment
Open

Allow random access in HDF5TableReader #2567

maxnoe opened this issue Jun 25, 2024 · 1 comment

Comments

@maxnoe
Copy link
Member

maxnoe commented Jun 25, 2024

Please describe the use case that requires this feature.

The HDF5TableReader essentially uses random access in a generator:

for row_index in range(n_rows):
     row = table[row_index]
     ...
     yield containers

But it doesn't expose this underlying random access nature.

Describe the solution you'd like

Change API of HDF5TableReader to allow __getitem__(self, index) to allow random access.

@kosack
Copy link
Contributor

kosack commented Jun 25, 2024

Just out of curiosity, where would this be useful?

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

No branches or pull requests

2 participants