[Numpy-discussion] SWIGed function does not like my boolean array
matthieu.brucher at gmail.com
Wed Nov 7 08:54:25 EST 2007
No, a bool is not an int32. Try just sizeof(bool) to be sure (on my box,
Besides, if you use a std::vector of bool, be aware of the fact that it is
not like the other vectors.
2007/11/7, Sebastian Haase <haase at msg.ucsf.edu>:
> I have a templated function written in C++.
> My SWIG typemap instantiates this for many argument array types (such
> as unit8, int16, uint16, int32, float32,float64,...)
> All works well, except when feeding in a boolean array as in
> I get this error:
> NotImplementedError: No matching function for overloaded 'mmms'
> What should I do ?
> Preferably I would avoid having to add another type-instantiation into
> the library (it looks already quite bloated having 6+ versions of
> every function). Isn't bool just a synonym for int32 ?
> Sebastian Haase
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
French PhD student
Website : http://miles.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion