Skip to content

BUG: torch: meshgrid defaults to indexing="xy" #322

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

Merged
merged 1 commit into from
May 13, 2025

Conversation

ev-br
Copy link
Member

@ev-br ev-br commented May 11, 2025

As of version 2.6, torch defaults to indexing='ij', and is planning to transition to 'xy' at some point. When it does, we'll be able to drop our wrapper.

cross-ref pytorch/pytorch#50276 for torch-specific details.

One other difference from the spec is that pytorch version returns a tuple of arrays, which matches numpy but deviates from jax or cupy, cross-ref data-apis/array-api#938

@ev-br ev-br added the bug Something isn't working label May 11, 2025
As of version 2.6, torch defaults to indexing='ij', and is planning
to transition to 'xy' at some point. When it does, we'll be able to drop
our wrapper.
@ev-br ev-br force-pushed the torch_meshgrid branch from 41027b3 to 5cf5d8f Compare May 11, 2025 20:19
@ev-br ev-br added this to the 1.12 milestone May 12, 2025
@ev-br ev-br merged commit 2b5e289 into data-apis:main May 13, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant