Skip to content

BUG: String fields in compound dtypes don't resize as might be expected #8969

Open
@eric-wieser

Description

@eric-wieser

Example:

>>> dt = np.dtype([('f', float), ('s', str)])
>>> np.array([(1.0, "hello world")], dt)
array([(1.0, '')], 
      dtype=[('f', '<f8'), ('s', 'S')])

Proposal: This should either resize or raise a ValueError (#8970), as it seems like it would always mask bugs

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