You could just as easily (and more compactly) construct a CSR matrix (see for example `DictVectorizer`). Is there any reason for choosing COO?