Skip to content

BUG: genfromtxt produce complex values with dtype object #16189

@eric-wieser

Description

@eric-wieser

Before #15534:

>>> np.genfromtxt(io.StringIO("1"), dtype=object)
array(b'1', dtype=object)
>>> np.genfromtxt(io.StringIO("what"), dtype=object)
array(b'what', dtype=object)

After:

>>> np.genfromtxt(io.StringIO("1"), dtype=object)
array((1+0j), dtype=object)
>>> np.genfromtxt(io.StringIO("what"), dtype=object)
array(None, dtype=object)

Originally posted by @eric-wieser in #15534

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions