[Python-Dev] Help with Unicode arrays in NumPy

Travis Oliphant oliphant.travis at ieee.org
Thu Feb 9 08:18:40 CET 2006


Thank you, Martin and Stephen, for the suggestions and comments.

For your information:

We decided that all NumPy arrays of unicode strings will use UCS4 for 
internal representation.  When an element of the array is selected, a 
unicodescalar (which inherits directly from the unicode builtin type but 
has attributes and methods of arrays) will be returned.   On wide 
builds, the scalar is a perfect match.  On narrow builds, surrogate 
pairs will be used if they are necessary as the data is copied over to 
the scalar.

Best regards,

-Travis




More information about the Python-Dev mailing list