If you are using sklearn.preprocessing.StandardScaler, note that the input is expected to have the shape [n_samples, n_features], while the mean and var have the shape [n_features,]. Passing your original input and the transposed one would thus result in a different scaling.