question: public static int findGlobalValleyLocation ( float [ ] data ) { float min = Float . NaN ; int imin = - 1 ; for ( int i = 0 ; i < data . length ; i ++ ) { if ( Float . isNaN ( data [ i ] ) ) continue ; if ( Float . 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.