Skip to content

Commit 1701b76

Browse files
bottlerfacebook-github-bot
authored andcommitted
another meshgrid fix for old pytorch
Summary: Try to fix circleci again. Reviewed By: nikhilaravi Differential Revision: D34752188 fbshipit-source-id: 5966c585b61d77df1d8dd97c24383cf74dfb1fae
1 parent 57a33b2 commit 1701b76

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pytorch3d/common/compat.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ def meshgrid_ij(
6666
"""
6767
Like torch.meshgrid was before PyTorch 1.10.0, i.e. with indexing set to ij
6868
"""
69-
if "indexing" in torch.meshgrid.__kwdefaults__:
69+
if (
70+
torch.meshgrid.__kwdefaults__ is not None
71+
and "indexing" in torch.meshgrid.__kwdefaults__
72+
):
7073
# PyTorch >= 1.10.0
7174
return torch.meshgrid(*A, indexing="ij")
7275
return torch.meshgrid(*A)

0 commit comments

Comments
 (0)