DOC Update docs for StandardScaler.scale_ to include 0 variance
@@ -617,8 +617,11 @@ class StandardScaler(TransformerMixin, BaseEstimator):
Attributes
----------
scale_ : ndarray of shape (n_features,) or None
- Per feature relative scaling of the data. This is calculated using
- `np.sqrt(var_)`. Equal to ``None`` when ``with_std=False``.
+ Per feature relative scaling of the data to achieve zero mean and unit
+ variance. Generally this is calculated using `np.sqrt(var_)`. If a
+ variance is zero, we can't achieve unit variance, and the data is left
+ as-is, giving a scaling factor of 1. `scale_` is equal to `None`
+ when `with_std=False`.
.. versionadded:: 0.17
*scale_*
