Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

add __len__ method to read_root with chunks #75

Merged
merged 1 commit into from
Oct 22, 2018

Conversation

pseyfert
Copy link
Contributor

This allows usage in progress bars, such as tqdm

for chunk in tqdm(read_root("filename.root", chunksize=100)):
    do_something(chunk)

This allows usage in progress bars, such as tqdm:
for chunk in tqdm(read_root("filename.root", chunksize=100)):
    do_something(chunk)
@coveralls
Copy link

coveralls commented Oct 22, 2018

Coverage Status

Coverage increased (+0.2%) to 84.058% when pulling 378b64a on pseyfert:progressbar into bf6b624 on scikit-hep:master.

@chrisburr
Copy link
Member

Great idea! Thanks 👍

@chrisburr chrisburr merged commit ff38aea into scikit-hep:master Oct 22, 2018
@eduardo-rodrigues
Copy link
Member

Hi @pseyfert and @chrisburr, may I suggest that you add an example usage to the README file?

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

Successfully merging this pull request may close these issues.

4 participants