We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ea1eb40 + 6caaf77 commit 4f84f8fCopy full SHA for 4f84f8f
src/boostedhh/utils.py
@@ -514,9 +514,11 @@ def load_sample(
514
515
# find the directory that contains the sample
516
for sp in sample_path:
517
- spy = sp / year
518
- full_samples_list = listdir(spy) # get all directories in data_dir
519
- load_samples = [str(s) for s in full_samples_list if sample.get_selector(year).match(s)]
+ spy = Path(sp) / year
+ full_samples_list = list(spy.iterdir()) # get all directories in data_dir
+ load_samples = [
520
+ s.name for s in full_samples_list if sample.get_selector(year).match(s.name)
521
+ ]
522
if len(load_samples):
523
sample_path = spy
524
break
0 commit comments