Skip to content

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

Merged
bluetech merged 1 commit into
9.0.xfrom
patchback/backports/9.0.x/21be7a259424e509e3d667082a138bcc8fc45c00/pr-14472
Jun 2, 2026
Merged

[PR #14472/21be7a25 backport][9.0.x] Fix _as_numpy_array: use variable obj instead of string literal "obj"#14480
bluetech merged 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

@bluetech bluetech force-pushed the patchback/backports/9.0.x/21be7a259424e509e3d667082a138bcc8fc45c00/pr-14472 branch from a17320c to 1e5f8d0 Compare June 2, 2026 13:03
@bluetech bluetech enabled auto-merge June 2, 2026 13:04
@bluetech bluetech merged commit b12824c into 9.0.x Jun 2, 2026
33 checks passed
@bluetech bluetech deleted the patchback/backports/9.0.x/21be7a259424e509e3d667082a138bcc8fc45c00/pr-14472 branch June 2, 2026 13:18
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.

2 participants