From 07484270df7943f5adb9e1fdc4d710212f5f0cbd Mon Sep 17 00:00:00 2001 From: Patrick Date: Tue, 10 Sep 2024 20:13:20 +0200 Subject: [PATCH] pep8 --- oggm/tests/test_models.py | 8 ++++---- oggm/utils/_funcs.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/oggm/tests/test_models.py b/oggm/tests/test_models.py index 80dfaa997..7b444a810 100644 --- a/oggm/tests/test_models.py +++ b/oggm/tests/test_models.py @@ -5713,10 +5713,10 @@ def test_distribute(self, hef_elev_gdir, inversion_params): fl_diag = fl_diag.isel(dis_along_flowline=slice(0, band_ids.max()+1)) for bid in band_ids: thick_band = thick.where(ds.band_index == bid) - fl_diag['volume_m3_dis'].data[:, bid] = ( - thick_band.sum(dim=['x', 'y']).values * dx2) - fl_diag['area_m2_dis'].data[:, bid] = ( - (thick_band > 1).sum(dim=['x', 'y']).values * dx2) + fl_diag['volume_m3_dis'].data[:, bid] = thick_band.sum(dim=['x', 'y'] + ).values * dx2 + fl_diag['area_m2_dis'].data[:, bid] = (thick_band > 1).sum(dim=['x', 'y'] + ).values * dx2 for yr in [2003]: # All the other years have larger errors but they somehow still look diff --git a/oggm/utils/_funcs.py b/oggm/utils/_funcs.py index fe8ec2869..247bccf14 100644 --- a/oggm/utils/_funcs.py +++ b/oggm/utils/_funcs.py @@ -687,7 +687,7 @@ def floatyear_to_date(yr): The floating year """ - if isinstance(yr, xr.DataArray): + if isinstance(yr, xr.DataArray): yr = yr.values out_y, remainder = np.divmod(yr, 1)