def _dict_to_sparse(matrix_dict):
    """Convert a dict back into a SciPy sparse COO matrix."""
    return scipy.sparse.coo_matrix(
        (matrix_dict['data'], (matrix_dict['row'], matrix_dict['col'])),
        shape=matrix_dict['shape'])
Convert a dict back into a SciPy sparse COO matrix.
language/nql/nql/__init__.py