Skip to content

Commit

Permalink
fix bug: pep8 compatibility
Browse files Browse the repository at this point in the history
line too long
  • Loading branch information
HasanAhmadQ7 authored and HasanAhmadQ7 committed Jul 20, 2019
1 parent 34d4115 commit 6416a16
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2327,13 +2327,14 @@ def interp_like(self, other, method='linear', assume_sorted=False,
def _maybe_cast_floats(self, indexers):
""" Cast float labels passed to sel() method to the float
types of the corresponding coordinates"""
from .dataarray import DataArray
from .dataarray import DataArray
casted_indexers = indexers.copy()
for k, v in indexers.items():
coords_var = self.coords[k].values
if isinstance(indexers[k], (slice, DataArray, Variable)):
pass
elif isinstance(coords_var, np.ndarray) and coords_var.dtype.kind == 'f':
elif isinstance(coords_var, np.ndarray) and
coords_var.dtype.kind == 'f':
casting_type = getattr(coords_var.dtype, "type")
casted_indexers[k] = casting_type(indexers[k])
return casted_indexers
Expand Down

0 comments on commit 6416a16

Please sign in to comment.