Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion gsw/geostrophy.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def geo_strf_dyn_height(SA, CT, p, p_ref=0, axis=0, max_dp=1.0,
except AttributeError:
order = 'C' # e.g., xarray DataArray doesn't have flags
for ind in indexer(SA.shape, axis, order=order):
igood = goodmask[ind]
# this is needed to support xarray inputs for numpy < 1.23
igood = np.asarray(goodmask[ind])
# If p_ref is below the deepest value, skip the profile.
pgood = p[ind][igood]
if len(pgood) > 1 and pgood[-1] >= p_ref:
Expand Down