Skip to content

Commit

Permalink
FIX: Fix masking issue in VAD michelson (#1428)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrover1 authored May 17, 2023
1 parent 3727e6e commit 143c756
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyart/retrieve/vad.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def _vad_calculation_m(velocity_field, azimuth, elevation):
vals2 = np.vstack((vals, vals))

# Summing non-nan data and creating new array with summed data
count = np.sum(np.isnan(sumv) is False, 0)
count = np.sum(~np.isnan(sumv), 0)
count = np.float64(count)
u_m = np.array([np.nansum(sumv, 0) // (2 * count)])

Expand Down Expand Up @@ -184,7 +184,7 @@ def _interval_mean(data, current_z, wanted_z):
for i in range(len(wanted_z))
]
mean_values = np.array(
[data[pos_lower[i] : pos_upper[i]].mean() for i in range(len(pos_upper))]
[(data[pos_lower[i] : pos_upper[i]]).mean() for i in range(len(pos_upper))]
)
return mean_values

Expand Down

0 comments on commit 143c756

Please sign in to comment.