[SciPy-user] scipy.sparse -=

Nathan Bell wnbell@gmail....
Fri Apr 18 12:40:59 CDT 2008

On Thu, Apr 17, 2008 at 4:43 PM, Joseph Turian <turian@gmail.com> wrote:
> Is there a -= for scipy.sparse matrices?

Not currently.   Unless the sparsity patterns of A and B in A -= B
were the same, then there's little benefit in supporting in-place

If A and B are CSR or CSC matrices with the same index arrays (i.e.
A.indptr == B.indptr and A.indices == B.indices) then A -= B is
equivalent to A.data -= B.data

Nathan Bell wnbell@gmail.com

More information about the SciPy-user mailing list