[SciPy-Dev] sparse boolean comparisons
Tue Jun 11 15:40:59 CDT 2013
I'm currently trying to implement boolean comparison operators in the
sparse package. My first priority is csr & csc. So far it looks like
comparisons where 2 zeros are compared to return false are easy, like !=
(but not ==). I got this working using the existing csr_binopt_csr routine
But for operations like ==, which should return True for all the zero
entries, the binopt routines do not apply the binopt when both elements are
zero. So I think the best way to implement == would just be by negating the
!= result in python. Since it will return a very dense matrix, it will be
What sort of syntax would be best for implementing negation? It should only
be applicable if the sparse matrix is dtype=bool. Should it be a method, or
a function in sparse?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-Dev