[Numpy-discussion] Is this a bug?

Charles R Harris charlesr.harris@gmail....
Tue May 27 15:12:03 CDT 2008


On Tue, May 27, 2008 at 1:31 PM, Travis E. Oliphant <oliphant@enthought.com>
wrote:

> Charles R Harris wrote:
> > I vaguely recall this generated an array from all the characters.
> >
> > In [1]: array('123', dtype='c')
> > Out[1]:
> > array('1',
> >       dtype='|S1')
> This may be a bug.
>
>  >>> import Numeric
>  >>> Numeric.array('123','c')
> array([1, 2, 3],'c')
>
> My memory of the point of 'c' was to mimic Numeric's behavior for
> character arrays.
>

Current behavior after fix is

In [1]: array('123','c')
Out[1]:
array(['1', '2', '3'],
      dtype='|S1')

Is that correct, then?

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080527/69e5dd5a/attachment.html 


More information about the Numpy-discussion mailing list