use a dict for sparse matrix constructors.