Skip to content

test_matrix_transpose: avoid calling asarray on nested sequence of arrays - #463

Merged
ev-br merged 1 commit into
data-apis:masterfrom
mdhaber:patch-1
Sep 6, 2026
Merged

test_matrix_transpose: avoid calling asarray on nested sequence of arrays#463
ev-br merged 1 commit into
data-apis:masterfrom
mdhaber:patch-1

Conversation

@mdhaber

@mdhaber mdhaber commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Closes gh-461

@ev-br ev-br left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran $ ARRAY_API_TESTS_MODULE=numpy pytest array_api_tests/test_linalg.py::test_matrix_transpose -v --max-examples=50_000 to triple-check that using stack does not throw off numpy's indexing returning scalars not 0D arrays, and it passed. Thus all is well, and the fix is clearly improves the Array API compatibility.

Merging, thanks @mdhaber.

I'll send a follow-up to clean up the duplication of

from . import _array_module
from . import _array_module as xp

@ev-br
ev-br merged commit 7c7c589 into data-apis:master Sep 6, 2026
5 checks passed
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.

test_linalg.test_matrix_transpose() calls asarray on nested sequence of arrays

2 participants