Please run the [pep8](https://pypi.python.org/pypi/pep8) linter tool on the source files added or modified by this PR. Actually you can directly run [flake8](https://pypi.python.org/pypi/flake8) to also detect stuff like useless imports or unused local variables if any. In particular the spacing of this line should be:

```python
    B = np.sum([(c - mean) ** 2 for c in centroids])
```