import numpy as np from sklearn.datasets import load_digits from sklearn.decomposition import PCA from sklearn.preprocessing import StandardScaler X, _ = load_digits(return_X_y=True) active_std = X.std(axis=0) active_std = active_std[active_std > 0] print(f"original shape: {X.shape}") print( "raw active-feature std range: " f"{active_std.min():.4f} to {active_std.max():.4f}" )