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

♻️ Let RioXarrayReader return dataarray only instead of tuple #24

Merged
merged 1 commit into from
Jul 6, 2022

Conversation

weiji14
Copy link
Owner

@weiji14 weiji14 commented Jul 6, 2022

Simplify downstream slicing tasks on an xarray.DataArray by returning a single dataarray per iteration instead of a tuple of (filepath, dataarray). The source filename can still be obtained via dataarray.encoding["source"].

Relates to #20 and handles bullet point in #22 (comment)

So the source filepath/url in an xarray.DataArray is actually in `dataarray.encoding["source"]` already, no need to return a tuple of (filepath, dataarray). This helps to streamline downstream slicing tasks by having only one object to deal with.
@weiji14 weiji14 added the feature New feature or request label Jul 6, 2022
@weiji14 weiji14 added this to the 0.2.0 milestone Jul 6, 2022
@weiji14 weiji14 self-assigned this Jul 6, 2022
@weiji14 weiji14 marked this pull request as ready for review July 6, 2022 03:46
@weiji14 weiji14 merged commit 3f8d0cb into main Jul 6, 2022
@weiji14 weiji14 deleted the tuple_to_dataarray branch July 6, 2022 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant