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

fix 122 #126

Merged
merged 1 commit into from
Dec 6, 2022
Merged

fix 122 #126

merged 1 commit into from
Dec 6, 2022

Conversation

juliettelavoie
Copy link
Contributor

@juliettelavoie juliettelavoie commented Dec 6, 2022

Pull Request Checklist:

  • pre-commit hooks are installed/active in my local clone ($ pre-commit install)
  • This PR addresses an already opened issue (for bug fixes / features)
  • (If applicable) Documentation has been added / updated (for bug fixes / features)
  • If a merge request has been made in parallel to this PR in xscen-notebooks, it is merged and the submodules have been updated.
  • HISTORY.rst has been updated (with summary of main changes)
    • Link to issue (:issue:number) and pull request (:pull:number) has been added

What kind of change does this PR introduce?

  • Adjust stack_drop_nan to new version of xarray.

Does this PR introduce a breaking change?

No, this returns the same thing as with the previous version of xarray.

Other information:

With the new version of xarray, lat and lon were dropped out of out on l.125 of utils. I removed drop-=True to recover the previous behaviour of keeping them as coordinates only.

@juliettelavoie juliettelavoie changed the title remove drop=True fix 122 Dec 6, 2022
Copy link
Collaborator

@aulemahal aulemahal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! Are you saying the drop=True was never doing anything up to the new xarray?
Anyway, we needn't worry too much about backward compatibility for now.

@juliettelavoie
Copy link
Contributor Author

Not exactly. With old xarray , drop=True dropped the coords loc (necessary to write to file) but not lat et lon.
With new xarray, drop=True drops loc, lat and lon, but drop=False drops only loc.

@juliettelavoie juliettelavoie merged commit 683a9e6 into main Dec 6, 2022
@juliettelavoie juliettelavoie deleted the fix-122 branch December 6, 2022 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stack_drop_nan broken by new xarray
2 participants