add util.py to matrices: dok<->csr conversion