The solution to this problem is as follows (taken from here ):
... change in the StringConverter._mapper class (numpy / lib / _iotools.py) from:
{{{ _mapper = [(nx.bool_, str2bool, False), (nx.integer, int, -1), (nx.floating, float, nx.nan), (complex, _bytes_to_complex, nx.nan + 0j), (nx.string_, bytes, asbytes('???'))] }}}
to
{{{ _mapper = [(nx.bool_, str2bool, False), (nx.int64, int, -1), (nx.floating, float, nx.nan), (complex, _bytes_to_complex, nx.nan + 0j), (nx.string_, bytes, asbytes('???'))] }}}
This resolved a similar problem that I had with numpy.genfromtxt for me
Please note that the author describes this as a “temporary” and “not optimal” solution. However, I had no side effects using v2.7 (else ?!).
atomh33ls
source share