Skip to content

Commit

Permalink
Merge pull request #3336 from dopplershift/pandas-warning
Browse files Browse the repository at this point in the history
Avoid pandas warning
  • Loading branch information
dcamron authored Dec 22, 2023
2 parents bb16c0d + 0cdfc31 commit e0e24d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/calc/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,14 +709,14 @@ def test_smooth_window_1d_dataarray():
temperature = xr.DataArray(
[37., 32., 34., 29., 28., 24., 26., 24., 27., 30.],
dims=('time',),
coords={'time': pd.date_range('2020-01-01', periods=10, freq='H')},
coords={'time': pd.date_range('2020-01-01', periods=10, freq='h')},
attrs={'units': 'degF'})
smoothed = smooth_window(temperature, window=np.ones(3) / 3, normalize_weights=False)
truth = xr.DataArray(
[37., 34.33333333, 31.66666667, 30.33333333, 27., 26., 24.66666667,
25.66666667, 27., 30.] * units.degF,
dims=('time',),
coords={'time': pd.date_range('2020-01-01', periods=10, freq='H')}
coords={'time': pd.date_range('2020-01-01', periods=10, freq='h')}
)
xr.testing.assert_allclose(smoothed, truth)

Expand Down

0 comments on commit e0e24d5

Please sign in to comment.