Skip to content

[PR #14472/21be7a25 backport][9.0.x] Fix _as_numpy_array: use variable obj instead of string literal "obj"#14480

Open
patchback[bot] wants to merge 1 commit into
9.0.xfrom
patchback/backports/9.0.x/21be7a259424e509e3d667082a138bcc8fc45c00/pr-14472
Open

[PR #14472/21be7a25 backport][9.0.x] Fix _as_numpy_array: use variable obj instead of string literal "obj"#14480
patchback[bot] wants to merge 1 commit into
9.0.xfrom
patchback/backports/9.0.x/21be7a259424e509e3d667082a138bcc8fc45c00/pr-14472

Conversation

@patchback
Copy link
Copy Markdown

@patchback patchback Bot commented May 14, 2026

This is a backport of PR #14472 as merged into main (21be7a2).

The second hasattr call in _as_numpy_array incorrectly passed the string literal "obj" instead of the variable obj when checking for __array_interface__. This caused objects implementing only __array_interface__ (without __array__) to not be recognized as numpy-like arrays by pytest.approx.

Closes #14456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant