Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-schmitt committed Sep 10, 2024
1 parent f490684 commit 0748427
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions oggm/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion oggm/utils/_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0748427

Please sign in to comment.