Issue #2611: MiniBatchKmeans crashes

Fixes [crash](https://github.com/scikit-learn/scikit-learn/issues/2611) by making sure arrays are the correct dimensions