[Numpy-discussion] Question about numarray Bool type

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


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 

Cheers, Peter.

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

More information about the NumPy-Discussion mailing list