from sklearn.preprocessing import normalize X_normalized = normalize(X, norm='l2', *, axis=1, copy=True, return_norm=False)