Skip to content

Commit

Permalink
fix(io.dataloader): assign coords also for multifile scan of length 1
Browse files Browse the repository at this point in the history
  • Loading branch information
kmnhan committed Dec 17, 2024
1 parent 3c7b4f0 commit 0b14f75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/erlab/io/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def load(
) # Return type enforced by metaclass, cast to avoid mypy error
# file_paths: list of file paths with at least one element

if len(file_paths) == 1:
if len(coord_dict) == 0:
# Single file resolved
data: xr.DataArray | xr.Dataset | xr.DataTree = self.load_single(
file_paths[0], **load_kwargs
Expand Down

0 comments on commit 0b14f75

Please sign in to comment.