Skip to content

Commit

Permalink
lint up the code
Browse files Browse the repository at this point in the history
  • Loading branch information
nlensse1 committed May 17, 2024
1 parent 6df1e4c commit 221d605
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions podaac/subsetter/xarray_enhancements.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def get_indexers_from_nd(cond: xr.Dataset, cut: bool) -> dict:
Indexer dictionary for the provided condition.
"""
# check if the lat/lon coordinate numpy array has 2 or more dimensions
transpose = False
if cond.values.squeeze().ndim == 2:
x_axis = 1
y_axis = 0
Expand All @@ -81,7 +82,6 @@ def get_indexers_from_nd(cond: xr.Dataset, cut: bool) -> dict:
else:
x_axis = 2
y_axis = 1
transpose = False

rows = np.any(cond.values.squeeze(), axis=x_axis)
if cut:
Expand Down Expand Up @@ -115,7 +115,7 @@ def get_indexers_from_nd(cond: xr.Dataset, cut: bool) -> dict:
cols = cols.transpose()[0]
else:
rows = rows[0]
cols = cols[0]
cols = cols[0]
indexers = {
cond_list[y_axis]: np.where(rows)[0],
cond_list[x_axis]: np.where(cols)[0]
Expand Down

0 comments on commit 221d605

Please sign in to comment.