Skip to content

Commit

Permalink
Added drop option passing for matEleSelector squeeze case.
Browse files Browse the repository at this point in the history
  • Loading branch information
phockett committed Jul 25, 2022
1 parent dc91f32 commit f8ec004
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion epsproc/util/selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ def matEleSelector(da, thres = None, inds = None, dims = None, sq = False, drop=
if (dims is not None) and (thres is not None):
daOut = daOut.where(np.abs(da).max(dim = dims) > thres, drop = drop)

# 25/07/22 - added drop here too, otherwise keeps squeezed dims by default (may depend on XR version, tested in v0.19)
if sq:
daOut = daOut.squeeze() # Squeeze dims.
daOut = daOut.squeeze(drop = drop) # Squeeze dims.

return daOut

Expand Down

0 comments on commit f8ec004

Please sign in to comment.