[SciPy-user] __eq__ for scipy.sparse not working?
Tue Apr 15 12:37:25 CDT 2008
Is there a reason that sparse matrices don't support this functionality?
What is actually happening when I try equality testing for A == B?
It seems undesirable that equality comparison is permitted, even though it
has unexpected behavior.
On Mon, Apr 14, 2008 at 7:57 PM, Nathan Bell <email@example.com> wrote:
> On Mon, Apr 14, 2008 at 4:45 PM, Joseph Turian <firstname.lastname@example.org> wrote:
> > I am having trouble determining equality of sparse matrices.
> > Consider this code snippet. Although the sparse matrices appear to be
> > z==y returns false (until I convert the matrices to dense matrices).
> > What is the problem with the equality test here?
> Sparse matrices don't currently support that functionality. A
> workaround could be abs(A-B).nnz == 0
> Nathan Bell email@example.com
> SciPy-user mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user