Confusing about StringIO, cStringIO and ByteIO
You should use io.StringIO for handling unicode objects and io.BytesIO for handling bytes objects in both python 2 and 3, for forwards-compatibility (this is all 3 has to offer). Here’s a better test (for python 2 and 3), that doesn’t include conversion costs from numpy to str/bytes import numpy as np import string b_data = … Read more