Skip to content

Cryptic SystemError when creating array with weird structured-but-empty dtype #5631

Closed
@gerritholl

Description

@gerritholl

Trying to create an array with a weird structured but empty dtype results in a SystemError:

In [214]: array([(), (), (), (), ()], dtype={'names':[], 'formats':[], 'offsets':[], 'itemsize':12})
---------------------------------------------------------------------------
SystemError                               Traceback (most recent call last)
<ipython-input-214-1b509554769d> in <module>()
----> 1 array([(), (), (), (), ()], dtype={'names':[], 'formats':[], 'offsets':[], 'itemsize':12})

SystemError: error return without exception set

This should be caught somewhere and a suitable exception should be raised instead of SystemError.

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