Method Statistics.median(double[]) ignores NaN values in array