[Numpy-discussion] Is this a bug?

Robert Kern robert.kern at gmail.com
Mon May 26 15:44:13 EDT 2008


On Mon, May 26, 2008 at 11:29 AM, Charles R Harris
<charlesr.harris at gmail.com> wrote:
> I vaguely recall this generated an array from all the characters.
>
> In [1]: array('123', dtype='c')
> Out[1]:
> array('1',
>       dtype='|S1')

When was the last time it did otherwise? This behavior is a
consequence of treating strings as scalars rather than containers of
characters. I believe we settled on this behavior before 1.0.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco



More information about the NumPy-Discussion mailing list