Skip to content

Commit 31e5510

Browse files
author
darothen
committed
fix some pep8 and comments
1 parent 8c7d6cf commit 31e5510

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

xarray/core/resample.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from scipy.interpolate import interp1d
66

77
from . import ops
8-
from .combine import merge
98
from .groupby import DataArrayGroupBy, DatasetGroupBy
109
from .pycompat import dask_array_type, OrderedDict
1110

@@ -134,7 +133,6 @@ def __init__(self, *args, **kwargs):
134133
"('{_dim}')! ".format(self))
135134
super(DataArrayResample, self).__init__(*args, **kwargs)
136135

137-
138136
def apply(self, func, shortcut=False, **kwargs):
139137
"""Apply a function over each array in the group and concatenate them
140138
together into a new array.
@@ -191,7 +189,8 @@ def _interpolate(self, kind='linear'):
191189
from .dataarray import DataArray
192190

193191
if isinstance(self._obj.data, dask_array_type):
194-
raise TypeError('dask arrays not supported yet in resample.interpolate()')
192+
raise TypeError('dask arrays not supported yet in '
193+
'resample.interpolate()')
195194

196195
x = self._obj[self._dim].astype('float')
197196
y = self._obj.data
@@ -301,6 +300,7 @@ def reduce(self, func, dim=None, keep_attrs=False, **kwargs):
301300
func, self._dim, keep_attrs, **kwargs)
302301

303302
def _interpolate(self, kind='linear'):
303+
"""Apply scipy.interpolate.interp1d along resampling dimension."""
304304
from .dataset import Dataset
305305
from .variable import Variable
306306

@@ -333,7 +333,7 @@ def _interpolate(self, kind='linear'):
333333
assume_sorted=True)
334334
interpolated = Variable(variable.dims, f(new_times))
335335

336-
data_vars[name ] = interpolated
336+
data_vars[name] = interpolated
337337

338338
return Dataset(data_vars, coords)
339339

0 commit comments

Comments
 (0)