Add readonly mode for sparse matrices