Open
Description
Looks like array_api_compat.torch.meshgrid
now always uses indexing='xy'
. These shouldn't pass, but do.
from array_api_compat import torch as xp
x = xp.asarray([1, 2, 3, 4])
y = xp.asarray([6, 7, 8])
Xxy, Yxy = xp.meshgrid(x, y, indexing='xy')
Xij, Yij = xp.meshgrid(x, y, indexing='ij')
assert xp.all(Xxy == Xij)
assert xp.all(Yxy == Yij)
import numpy as np
X, Y = np.meshgrid(x, y, indexing='xy')
np.testing.assert_equal(Xij, X)
np.testing.assert_equal(Yij, Y)