scipy/scipy — pull request #3057 by perimosocordiae (2013-11-12 11:26:24+00:00)
Title: ENH: fast paths for hstack/vstack with csc/csr matrices

The current version calls `bmat`, which converts everything to COO format. This change provides a considerable speedup for the fast-path cases:

````
import numpy as np
import scipy.sparse as sps
a = sps.csc_matrix(np.arange(1000).reshape(5,-1))
b = sps.csc_matrix(np.arange(1000).reshape(5,-1))
```

Before this PR:
```
%timeit sps.hstack((a,b))
1000 loops, best of 3: 820 us per loop
```

After:
```
%timeit sps.hstack((a,b))
1000 loops, best of 3: 267 us per loop
```