another meshgrid fix for old pytorch

Summary: Try to fix circleci again.

Reviewed By: nikhilaravi

Differential Revision: D34752188

fbshipit-source-id: 5966c585b61d77df1d8dd97c24383cf74dfb1fae
This commit is contained in:
Jeremy Reizenstein 2022-03-11 01:14:59 -08:00 committed by Facebook GitHub Bot
parent 57a33b25c1
commit 1701b76a31

View File

@ -66,7 +66,10 @@ def meshgrid_ij(
""" """
Like torch.meshgrid was before PyTorch 1.10.0, i.e. with indexing set to ij Like torch.meshgrid was before PyTorch 1.10.0, i.e. with indexing set to ij
""" """
if "indexing" in torch.meshgrid.__kwdefaults__: if (
torch.meshgrid.__kwdefaults__ is not None
and "indexing" in torch.meshgrid.__kwdefaults__
):
# PyTorch >= 1.10.0 # PyTorch >= 1.10.0
return torch.meshgrid(*A, indexing="ij") return torch.meshgrid(*A, indexing="ij")
return torch.meshgrid(*A) return torch.meshgrid(*A)