Hello, 
I'm working on adding support for the bool dtype for sparse matrices. But I'm having some problems
I'm adding a wrapper for the npy_bool type. I've included a file called bool_ops.h which basically contains:

typedef npy_int8 npy_bool_wrapper;
(https://github.com/cowlicks/scipy/blob/swig-sandbox/scipy/sparse/sparsetools/bool_ops.h)

Then I included bool_ops.h and the wrapper npy_bool_wrapper in sparsetools.i and numpy.i where I thought it was necessary. So that the typemaps for the npy_bool type are generated.

You can see this in my branch:
in sparsetools.i
https://github.com/cowlicks/scipy/blob/swig-sandbox/scipy/sparse/sparsetools/sparsetools.i#L13
https://github.com/cowlicks/scipy/blob/swig-sandbox/scipy/sparse/sparsetools/sparsetools.i#L152
https://github.com/cowlicks/scipy/blob/swig-sandbox/scipy/sparse/sparsetools/sparsetools.i#L180
in numpy.i
https://github.com/cowlicks/scipy/blob/swig-sandbox/scipy/sparse/sparsetools/numpy.i#L9
https://github.com/cowlicks/scipy/blob/swig-sandbox/scipy/sparse/sparsetools/numpy.i#L537

However I still get the same error seen before in ticket #1533 (https://github.com/scipy/scipy/issues/2058)

TypeError: Array of type 'byte' required.  Array of type 'bool' given

Which is not what I expected because the typemaps for bool type should now be generated. 

Could the order in INSTANTIATE_ALL be the problem? (https://github.com/cowlicks/scipy/blob/swig-sandbox/scipy/sparse/sparsetools/sparsetools.i#L176

Why is order important here? I included npy_bool_wrapper where I did because the Numpy C api says npy_bool is an unsigned char. I'm currently trying to reorder INSTANTIATE_ALL to make things work. 

Thanks in advance,