scipy/scipy — pull request #4103 by larsmans (2014-10-26 17:47:00+00:00)
Title: ENH: sparse: faster setdiag for CSR and CSC matrices

Trying to speed up the tests here. Before, the four slowest tests were

```
test_base.TestCSRNonCanonical.test_setdiag: 4.6238s
test_base.TestCSCNonCanonical.test_setdiag: 4.5692s
test_base.TestCSR.test_setdiag: 4.4937s
test_base.TestCSC.test_setdiag: 4.4765s
```

After, it's the same four, but they take a little less time:

```
test_base.TestCSCNonCanonical.test_setdiag: 3.3904s
test_base.TestCSRNonCanonical.test_setdiag: 3.2470s
test_base.TestCSR.test_setdiag: 3.1338s
test_base.TestCSC.test_setdiag: 3.0898s
```

Not as quick as a I hoped, but still a net improvement.