// Adding a transposition gives F order computation.
var = np.mean((series.T ** 2).T, axis=0)
else:
var = np.mean(series ** 2, axis=0)
var_thr = stats.scoreatpercentile(var, 100. - percentile)
series = series[:, var > var_thr] // extract columns (i.e. features)
// Return the singular vectors with largest singular values
After Change
// Compute variance without mean removal.
// The execution speed of these three lines is independent of array
// ordering (C or F)
var = np.copy(series)
var **= 2
var = var.mean(axis=0)
var_thr = stats.scoreatpercentile(var, 100. - percentile)