Blake Griffith <blake.a.griffith <at> gmail.com> writes:
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;
This will potentially not be enough for SWIG to treat bool wrapper output values as a separate type, it might have to be a separate class. So it's best to stick to the complex types recipe if you don't exactly know what you are doing. The order of instantiation and type maps should not matter. One way to check what is going on is to look into the SWIG generated cxx files. Does bool_wrapper appear there in the same way as the complex types? The generated output is quite crazy and difficult to understand, but if you don't see bool wrapper anywhere, then something is not done correctly on the swig level.