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

assert ds errors in test_dataset.py #6123

Merged
merged 1 commit into from
Dec 29, 2021
Merged
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions xarray/tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -6497,14 +6497,14 @@ def test_deepcopy_obj_array():

def test_clip(ds):
result = ds.clip(min=0.5)
assert result.min(...) >= 0.5
assert all((result.min(...) >= 0.5).values())

result = ds.clip(max=0.5)
assert result.max(...) <= 0.5
assert all((result.max(...) <= 0.5).values())

result = ds.clip(min=0.25, max=0.75)
assert result.min(...) >= 0.25
assert result.max(...) <= 0.75
assert all((result.min(...) >= 0.25).values())
assert all((result.max(...) <= 0.75).values())

result = ds.clip(min=ds.mean("y"), max=ds.mean("y"))
assert result.dims == ds.dims
Expand Down