From: Francesc A. <fa...@op...> - 2003-09-30 16:41:26
|
Hi Marc, 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"]) CharArray(['asd', 'aa']) >>> a=strings.array(["asd", "aa"]) >>> a[1] 'aa' >>> a.raw()[1] # If you want to get *all* spaces and nulls in strings 'aa ' This is undocumented in the manual, but it's quite well described in the doc strings: >>> help(strings.array) Cheers, -- Francesc Alted |