Here you can find the source of removeNaN(double[] x1)
private static double[] removeNaN(double[] x1)
//package com.java2s; // it under the terms of the GNU General Public License as published by // import java.util.Arrays; public class Main { private static double[] removeNaN(double[] x1) { int i;/* w ww.j av a 2s. c o m*/ for (i = 0; i < x1.length; i++) { if (Double.isNaN(x1[i])) { break; } } i = i > x1.length ? x1.length : i; return Arrays.copyOf(x1, i); } }