[SciPy-Dev] Sparse boolean specification
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 <email@example.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-Dev