[SciPy-Dev] Sparse boolean specification

Blake Griffith blake.a.griffith@gmail....
Mon Apr 22 13:51:11 CDT 2013


So Pauli, if this is implemented as you suggest, the specification could
recommend using the inverse of the typical bool_op. For example if you
think that A and B are approximately equal, instead of checking with `A ==
B`. You could do `A != B` and check for an empty sparse matrix?

However there does not seem to be an easy way to avoid a matrix full of
`True`'s if you don't know much about A or B.


On Mon, Apr 22, 2013 at 11:29 AM, Pauli Virtanen <pav@iki.fi> wrote:

> 22.04.2013 19:08, J.J. Green kirjoitti:
> > Pauli Virtanen wrote:
> >
> >> The drawback here is that `==`, `<=`, `>=` become somewhat
> >> useless for sparse matrices as it tends to produce matrices
> >> filled with True. But I think this cannot be helped.
> >
> > Can't you then just have a sparse structure which also hold
> > the 'empty' value (whether it be true or false), then the
> > non-empty cells are the opposite value.  Thus !a just changed
> > the 'empty' value and leaves the matrix structure otherwise
> > unchanged ?
>
> Yes, that's one option, but it involves significantly more work,
> introducing even more sparse matrix types in addition to the current 6.
>
> --
> Pauli Virtanen
>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20130422/51388b26/attachment.html 


More information about the SciPy-Dev mailing list