From 1701b76a31e3e8c97d51b49dfcaa060762ab3764 Mon Sep 17 00:00:00 2001 From: Jeremy Reizenstein Date: Fri, 11 Mar 2022 01:14:59 -0800 Subject: [PATCH] another meshgrid fix for old pytorch Summary: Try to fix circleci again. Reviewed By: nikhilaravi Differential Revision: D34752188 fbshipit-source-id: 5966c585b61d77df1d8dd97c24383cf74dfb1fae --- pytorch3d/common/compat.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pytorch3d/common/compat.py b/pytorch3d/common/compat.py index 1b81c386..74a8dd69 100644 --- a/pytorch3d/common/compat.py +++ b/pytorch3d/common/compat.py @@ -66,7 +66,10 @@ def meshgrid_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 return torch.meshgrid(*A, indexing="ij") return torch.meshgrid(*A)