[Numpy-discussion] Question about numarray Bool type

Peter Verveer verveer at embl-heidelberg.de
Tue May 6 05:52:13 CDT 2003


Hi,

In the numarray source code Bool is defined as a typedef to char. Does the 
Bool array type correspond to the Int8, or the UInt8 type? If I recall 
correctly, the char type may be signed or unsigned. Can I make any 
assumptions about the C type used to implement Bool at all?

I guess at the Python level it does not matter what actual C type is used to 
implement bool arrays as it only represents boolean values. However, at the 
level of C extensions I would like to deal with Bool arrays by calling 
existing functions written for the appropiate C type. That would be somewhat 
simpler if Bool is always garantueed to be either a unsigned or a signed char 
type. 

Cheers, Peter.

-- 
Dr. Peter J. Verveer
Cell Biology and Cell Biophysics Programme
EMBL
Meyerhofstrasse 1
D-69117 Heidelberg
Germany
Tel. : +49 6221 387245
Fax  : +49 6221 387242
Email: Peter.Verveer at embl-heidelberg.de






More information about the Numpy-discussion mailing list