I am having some seemingly trivial trouble with numpy when the array contains string data. I have the following code:
my_array = numpy.empty([1, 2], dty
I got a "codec error" when I tried to use a non-ascii character with dtype="S10"
dtype="S10"
You also get an array with binary strings, which confused me.
I think it is better to use:
my_array = numpy.empty([1, 2], dtype="
Here 'U10' translates to "Unicode string of length 10; little endian format"