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 boolean dask index in tests #165

Merged
merged 8 commits into from
Jun 9, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update test_utils.py
  • Loading branch information
jbusecke authored Jun 8, 2023
commit 2e597083b3cc4f976f04978bb5c280c80e275f37
6 changes: 3 additions & 3 deletions xarrayutils/test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ def test_linregress_ufunc():
def _linregress_ufunc(a, b, nanmask=False):
"""ufunc to wrap check output of `xr_linregress` against pure scipy results"""
if nanmask:
idxa = np.isnan(a)
idxb = np.isnan(b)
mask = np.logical_and(~idxa, ~idxb).load()
idxa = np.isnan(a.load())
idxb = np.isnan(b.load())
mask = np.logical_and(~idxa, ~idxb)
if sum(~mask) < len(b): # only applies the mask if not all nan
a = a[mask]
b = b[mask]
Expand Down