scikit-learn/scikit-learn — Issue #420: bug in preprocessing.scale()
Author: dmaniloff
Created: 2011-11-01 18:49:02+00:00
State: open

error with shortcut operator '-='
line
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/preprocessing/__init__.py#L87
should probably be changed to

>>> Xr
array([[0, 9, 8],
[0, 0, 0]])
>>> mean
array([ 0. , 4.5, 4. ])
>>> Xr-mean
array([[ 0. , 4.5, 4. ],
[ 0. , -4.5, -4. ]])
>>> Xr-=mean
>>> Xr
array([[ 0, 4, 4],
[ 0, -4, -4]])