Skip to content

Commit

Permalink
remove filter warnings with heat_index negative sqrt
Browse files Browse the repository at this point in the history
  • Loading branch information
cyschneck committed Apr 16, 2024
1 parent b75a39f commit bffe381
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion test/test_dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def test_dewtemp_dask(self):
assert isinstance((out - 273.15).data, dask.array.Array)
assert np.allclose(out - 273.15, dt_2, atol=0.1)

@pytest.mark.filterwarnings("ignore:invalid value encountered in sqrt")
def test_heat_index_dask(self):

ncl_gt_1 = [
Expand Down
6 changes: 0 additions & 6 deletions test/test_meteorology.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ def test_alt_coef(self) -> None:
self.ncl_gt_2,
atol=0.005)

@pytest.mark.filterwarnings(
"ignore:invalid value encountered in sqrt"
) # ignores RuntimeWarning sqrt is negative, np.sqrt produces nan
def test_xarray_alt_coef(self) -> None:
assert np.allclose(heat_index(xr.DataArray(self.t2),
xr.DataArray(self.rh2), True),
Expand All @@ -113,9 +110,6 @@ def test_list_input(self) -> None:
self.ncl_gt_1,
atol=0.005)

@pytest.mark.filterwarnings(
"ignore:invalid value encountered in sqrt"
) # ignores RuntimeWarning sqrt is negative, np.sqrt produces nan
def test_xarray_input(self) -> None:
t = xr.DataArray(self.t1)
rh = xr.DataArray(self.rh1)
Expand Down

0 comments on commit bffe381

Please sign in to comment.