Skip to content

Malformed __array_wrap__ causes SystemError #8507

@eric-wieser

Description

@eric-wieser

Or sometimes even a python crash. Demo:

>>> class Foo(np.ndarray):
...   def __array_wrap__(self, obj): pass
>>> f = np.zeros(2).view(Foo)
>>> f + 1
SystemError: <ufunc 'add'> returned NULL without setting an error
# sometimes: nasal demons

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions