question: public static int findGlobalValleyLocation ( double [ ] data ) { double min = Double . NaN ; int imin = - 1 ; for ( int i = 0 ; i < data . length ; i ++ ) { if ( Double . isNaN ( data [ i ] ) ) continue ; if ( Double . isNaN ( min ) || data [ i ] < min ) { min = data [ i ] ; imin = i ; } } return imin ; }
target:  Find the minimum of all elements in the array, ignoring elements that are NaN.