[Numpy-discussion] Is a string a scalar type?

Charles R Harris charlesr.harris@gmail....
Sat Mar 24 20:27:31 CDT 2007


On 3/24/07, Robert Kern <robert.kern@gmail.com> wrote:
>
> Charles R Harris wrote:
> > In [10]: isscalar('hello world')
> > Out[10]: True
>
> As far as numpy is concerned, they are.
>
> >>> from numpy import *
> >>> array('hello world')
> array('hello world',
>       dtype='|S11')


Dunno, by that reasoning objects could also be considered scalars as they
can be elements of object arrays.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070324/2bf6adff/attachment.html 


More information about the Numpy-discussion mailing list