[Numpy-discussion] Migrating Char arrays
falted at openlc.org
Tue Sep 30 09:42:05 CDT 2003
A Dimarts 30 Setembre 2003 18:21, Marc Poinot va escriure:
> Is there something in numarray that could replace the Numeric interface
> for this string type? Is it difficult to add a 'Character' type?
> Is the (undocumented) CharArrayType the solution for this?
Yes, it is. See:
>>> from numarray import strings
>>> strings.array(["asd", "aa"])
>>> a=strings.array(["asd", "aa"])
>>> a.raw() # If you want to get *all* spaces and nulls in strings
This is undocumented in the manual, but it's quite well described in the doc
More information about the Numpy-discussion