@Test
public void nans() throws Exception {

    Number[] values = {Double.NaN, Double.NaN, Double.NaN, Double.NaN, Double.NaN};
    List<Number> weightList = Arrays.asList(values);
    double[] actuals = Weights.buildRleWeights(weightList, 3);
    System.out.println("actuals = " + Arrays.toString(actuals));
    assertArrayEquals(new double[]{
            Double.POSITIVE_INFINITY, 5.0, Double.NaN}, actuals, 0.01);
}