Thanks to visit codestin.com
Credit goes to github.com

Skip to content

npyio.py --> recfromcsv seems to have a bug that ignores any dtypes provided #311

Closed
@kobejohn

Description

@kobejohn

I found this due to someone's problem loading large integers with recfromcsv. After playing with it, I think it is simply ignoring all the dtype information provided.

Line 1859 in npyio.py, part of recfromcsv() tries to either bring in the dtypes passed or set None. However, it actually brings in a kwarg that I couldn't find anywhere else called 'update' which looks suspiciously like a copied mistype from earlier in the line. If I change 'update' --> 'dtype', then the types get picked up as expected. More explicitly, in recfromcsv, change:

kwargs.update(dtype=kwargs.get('update', None),

to this:

kwargs.update(dtype=kwargs.get('dtype', None),

I found this in the github repo (although I may have been looking at the wrong branch) as well as the 1.6.2 release that I am using.

_(apologies for double posting this. I posted in trac first and then heard that maybe that won't be looked at. I haven't found a way to delete or close that ticket.)_

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions