Re: [Numpy-discussion] Incorrect removal of NULL char in buffers

2006-09-29 Thread Travis Oliphant
Francesc Altet wrote: > Hi, > > > However, for string values, numpy seems to work in a strange way. > The numarray have an expected behaviour, IMO: > > In [100]: numarray.strings.array(buffer="a\x00b"*4, itemsize=4, shape=3) > Out[100]: CharArray(['a', '', 'ba']) > > I'm not sure why you thin

[Numpy-discussion] Incorrect removal of NULL char in buffers

2006-09-29 Thread Francesc Altet
Hi, I'm trying to build-up numpy arrays coming from buffers, and I'm getting a somewhat unexpected result. First, for numeric values, everything seems ok (i.e. the NULL character is correctly interpretated), and works equally for both numarray and numpy: In [98]: numarray.array("a\x00b"*4, dty