8000 numpy.genfromtxt() with Python 3.1.2 fails (migrated from Trac #1607) · Issue #3158 · thouis/numpy-trac-migration · GitHub
[go: up one dir, main page]

Skip to content
numpy.genfromtxt() with Python 3.1.2 fails (migrated from Trac #1607) #3158
@thouis

Description

@thouis

Original ticket http://projects.scipy.org/numpy/ticket/1607
Reported 2010-09-09 by trac user magiclamp, assigned to unknown.

Hello:

genfromtxt() fails with the following TypeError.

Thanks for the nice package!

[search_dist][10273] > cat z.dat

0.01604 0.02668 0.03254 0.03254 0.15647 0.20313 0.02214 0.02214

[search_dist][10274] > python

Python 3.1.2 (r312:79147, Sep 2 2010, 17:16:43)

[GCC 4.5.0] on linux2

Type "help", "copyright", "credits" or "license" for more information.

65AC

import numpy

numpy.version.version

'1.5.0'

numpy.genfromtxt('z.dat')

Traceback (most recent call last):
File "", line 1, in
File "/usr/intel/pkgs/python/3.1.2/lib/python3.1/site-packages/numpy/lib/npyio.py", line 1126, in genfromtxt
first_values = split_line(first_line)
File "/usr/intel/pkgs/python/3.1.2/lib/python3.1/site-packages/numpy/lib/_iotools.py", line 206, in _delimited_splitter
line = line.split(self.comments)[0].strip(asbytes(" \r\n"))
TypeError: Can't convert 'bytes' object to str implicitly

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0