def _clean_nans(scores):
 scores = as_float_array(scores, copy=True)
 scores[np.isnan(scores)] = np.finfo(scores.dtype).min
 return scores

def _clean_nans ( scores ) : scores = as_float_array ( scores , copy = True ) scores [ np . isnan ( scores ) ] = np . finfo ( scores . dtype ) . min return scores
fixes issue #1240: nans cant be properly compared .