Skip to content

Commit

Permalink
Per #1450, update NumArray functions to only sort if the data is not …
Browse files Browse the repository at this point in the history
…yet sorted. And check for bad data when computing the standard deviation.
  • Loading branch information
JohnHalleyGotway committed Feb 10, 2021
1 parent bd65af9 commit db9ba4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions met/src/basic/vx_util/num_array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ void NumArray::sort_array()

{

sort(e, Nelements);
if(!Sorted) sort(e, Nelements);

Sorted = true;

Expand Down Expand Up @@ -784,7 +784,7 @@ double var;

compute_mean_variance(mn, var);

stdev = square_root(var);
stdev = (is_bad_data(var) ? bad_data_double : square_root(var));

return;

Expand Down

0 comments on commit db9ba4a

Please sign in to comment.