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

unpin xarray #831

Merged
merged 21 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/requirements/maximum-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
- pytest-cov
- pytest-xdist
- scipy
- xarray<=2022.10.0
- xarray
- xesmf
- xrft
- xskillscore>=0.0.18
Expand Down
2 changes: 1 addition & 1 deletion ci/requirements/minimum-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- pytest-cov
- pytest-xdist
- scipy
- xarray<=2022.10.0
- xarray
- xskillscore>=0.0.18
- tqdm
- pip:
Expand Down
6 changes: 5 additions & 1 deletion climpred/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2210,6 +2210,7 @@ def verify(
The verification does not need to reduce a dimension. To obtain the skill for
each initialization, set ``dim=[]``.

>>> HindcastEnsemble.get_initialized().coords # doctest: +SKIP
aaronspring marked this conversation as resolved.
Show resolved Hide resolved
>>> HindcastEnsemble.verify(
... metric="rmse",
... comparison="e2o",
Expand Down Expand Up @@ -2392,7 +2393,10 @@ def _verify(
if (
"valid_time" in res.coords
): # NaNs in valid_time only happen for same_verifs and dim=[]
if res.coords["valid_time"].isnull().any():
if res.coords["valid_time"].isnull().any() and (
res.coords["valid_time"].size
== self.get_initialized().coords["valid_time"].size
):
aaronspring marked this conversation as resolved.
Show resolved Hide resolved
res.coords["valid_time"] = self.get_initialized().coords["valid_time"]

res = assign_attrs(
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
xarray<2023.01
xarray
dask>=2021.10.0
cftime>=1.5.0
xskillscore>=0.0.20
Expand Down
Loading