Skip to content

Commit

Permalink
blacken
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Jan 25, 2020
1 parent d338185 commit 5cdf82e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xarray/core/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,13 @@ def convert_label_indexer(index, label, index_name="", method=None, tolerance=No
indexer, new_index = index.get_loc_level(label.item(), level=0)
elif isinstance(index, pd.CategoricalIndex):
if method is not None:
raise ValueError("'method' is not a valid kwarg when indexing using a CategoricalIndex.")
raise ValueError(
"'method' is not a valid kwarg when indexing using a CategoricalIndex."
)
if tolerance is not None:
raise ValueError("'tolerance' is not a valid kwarg when indexing using a CategoricalIndex.")
raise ValueError(
"'tolerance' is not a valid kwarg when indexing using a CategoricalIndex."
)
indexer = index.get_loc(label.item())
else:
indexer = index.get_loc(
Expand Down

0 comments on commit 5cdf82e

Please sign in to comment.