[SciPy-Dev] Adding boolean support to the sparse package, design choices
Mon Apr 22 23:13:16 CDT 2013
I've been investigating how I would go about doing this, so far there seem
to be three ways. (A) By keeping all the operations in python and using
it's bool dtype.(B) By adding bool support to the existing C++ routines we
currently have. (C) Or by converting back and forth from int8 to bool where
the python and C++ interface.
(A) Seems like it might be the easiest, but slowest, and inconsistent with
how other types are handled.
(B) Seems like the *right* way but I'm not sure how I would add bool
support to the routines we have. Should I write new functions just for bool
operations? Or can support for bool types be added to the existing
(C) I think I could do this by adding a new attribute to sparse matrices
like 'native_dtype' and always convert back to it after using a C++
routine... This seems kind of hackish.
I think (B) is probably the right choice. Suggestions?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-Dev