The following demonstrates the problem:
import io
import numpy as np
a = np.loadtxt(io.StringIO("val1 val2\nval3 val4"), \
dtype=np.dtype([("col1", "S10"), ("col2", "S10")]))
print("looks weired: %s"%(a["col1"][0]))
assert(a["col1"][0] == "val1")
I don't understand how I should compare the strings. On my system (numpy 1.6.2, python 3.2.2) the output looks like this:
>>>
looks weired: b'val1'
Traceback (most recent call last):
File "D:/..../bug_sample.py", line 7, in <module>
assert(a["col1"][0] == "val1")
AssertionError