[Numpy-discussion] String to integer array of ASCII values

Peter numpy-discussion@maubp.freeserve.co...
Thu Jul 23 10:50:06 CDT 2009


On Thu, Jul 23, 2009 at 3:54 PM, Charles R
Harris<charlesr.harris@gmail.com> wrote:
>
> Would something like
>
> In [2]: array("ABCDEF", 'c').view(uint8)
> Out[2]: array([65, 66, 67, 68, 69, 70], dtype=uint8)
>
> work for you?

Yes, that also looks good. I guess I have a couple of options to
benchmark now :)

Thank you,

Peter


More information about the NumPy-Discussion mailing list