Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Ignore fewer errors during array-coercion #18015

Merged
merged 1 commit into from Dec 18, 2020

Conversation

charris
Copy link
Member

@charris charris commented Dec 18, 2020

Backport of #17817.

This changes it so that we only ignore attribute errors on
looking up __array__ and propagate errors when checking
for sequences len(obj) if those errors are either
RecursionError or MemoryError (we consider them unrecoverable).

Also adds test for bad recursive array-like with sequence
as reported in gh-17785. The test might be flaky/more complicated
in which case it should probably just be deleted.

This changes it so that we only ignore attribute errors on
looking up `__array__` and propagate errors when checking
for sequences `len(obj)` if those errors are either
RecursionError or MemoryError (we consider them unrecoverable).

Also adds test for bad recursive array-like with sequence
as reported in numpygh-17785. The test might be flaky/more complicated
in which case it should probably just be deleted.
@charris charris added this to the 1.20.0 release milestone Dec 18, 2020
@charris charris merged commit 03cb000 into numpy:maintenance/1.20.x Dec 18, 2020
@charris charris deleted the backport-17817 branch December 18, 2020 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants