[Numpy-discussion] SWIGed function does not like my boolean array

Matthieu Brucher matthieu.brucher@gmail....
Wed Nov 7 10:23:04 CST 2007


>
> I don't understand.  I'm thinking of most math functions in the
> C-library. In C a boolean is just an integer of 0 or 1 (quasi, by
> definition).
>
> Could you explain what you mean ?
>

In C++, bool is a new type that has two values, true and false. If you add
true and true, it is still true, and not 2. In C, everything that is not 0
is true, not in C++.

Matthieu
-- 
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...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20071107/3fb0d3dc/attachment.html 


More information about the Numpy-discussion mailing list