scikit-learn/scikit-learn — pull request #1880 by NicolasTr (2013-04-21 13:55:23+00:00)
Title: Patch extractor doesn't support float values for max patches

I got this error when using max_patches=0.1 with PatchExtractor:
```
ValueError: could not broadcast input array from shape (103632,7,7) into shape (0,7,7)
```

I solved the problem with an auxiliar function to avoid code duplication and I added a test.