Can we refactor this and move it into `sparse.pyx`? It would be nice for distarray to know less about the details of handling sparse stuff :).

something like: `tgt = sparse.compute_sparse_update(...)`

Or whatever name makes sense.