From: Francesc A. <fa...@op...> - 2003-02-17 18:40:45
|
Hi, I'm trying to map Numeric character typecode ('c') to chararrays, but I h= ave a problem to distinguish between In [109]: chararray.array("qqqq") Out[109]: CharArray(['qqqq']) and In [110]: chararray.array(["qqqq"]) # Note the extra "[" "]" Out[110]: CharArray(['qqqq']) # The same result as 109 while in Numeric we have: In [113]: Numeric.array("qqqq") Out[113]: array([q, q, q, q],'c') In [114]: Numeric.array(["qqqq"]) Out[114]: array([ [q, q, q, q]],'c') # Differs from 113 even in numarray objects, rank-0 seems to work well: In [107]: numarray.array(1) Out[107]: array(1) In [108]: numarray.array([1]) Out[108]: array([1]) # Objects differ So, it seems like if chararray does not support well rank-0 objects. Is t= his the expected behavior?. If yes, we have no possibility to distinguish between object 109 and 110, and I'd like to distinguish between this two. What can be done to achieve this? Thanks, --=20 Francesc Alted |