[SciPy-Dev] sparse boolean comparisons
Pauli Virtanen
pav at iki.fi
Tue Jun 11 17:11:10 EDT 2013
12.06.2013 00:02, Blake Griffith kirjoitti:
> > 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?
[clip]
> I'm just overriding __invert__, and raising an error if the dtype is wrong.
[clip]
__invert__ is used in Numpy boolean arrays for negation, so sparse
should also go with that.
--
Pauli Virtanen
More information about the SciPy-Dev
mailing list