[SciPy-user] scipy.sparse: coo_matrix ignores sum_duplicates=False
James Philbin
philbinj at gmail.com
Mon Oct 13 10:52:51 EDT 2008
Hi,
> Note that CSR.todense() implicitly sums duplicate entries (it's
> essentially zeros((N,M)) += A). You should find that the CSR
> representation *does* contain the duplicate entries:
Hmm, I see. This is quite subtle (+ suprising) as to all intents and
purposes the csr_matrix behaves as if the duplicates had been summed
whether or not sum_duplicates=True or False. The parameter name
probably needs to be changed and/or something said in the docstring.
What I was actually looking for was a way for duplicates to be
ignored, which i've found with dok_matrix.
Thanks a lot,
James
More information about the SciPy-User
mailing list