btw, the current code of this PR gives what I believe is the incorrect result of 

```
>>> doktocsr(m)
[[1, 2, 3], [0, 2, 0], [0, 2, 3]]
```

The elements of row i should be `A[IA[i]:IA[i+1]]`.

Also, I think this should be a method of Sparse, perhaps called `as_csr()`