scipy/scipy — pull request #3076 by perimosocordiae (2013-11-18 12:24:42+00:00)
Title: BUG: sparse boolean indexing flaky test

The `test_fancy_indexing_boolean` test case was passing erroneously due to the random initialization of `Z` and `Y`.
Making changes to other parts of the file caused this case to fail when the last column of `Z` happened to be all `False`.

I looked at how numpy arrays handle boolean indexing, and changed the test case to reflect that behavior. In doing so, I had to fix a small bug with CSR matrices.