From c7b45b96f4c1fe5a47bf8dd26b1516d1b6c76a99 Mon Sep 17 00:00:00 2001 From: Henry Krumb Date: Thu, 18 Dec 2025 15:10:51 +0100 Subject: [PATCH] fix walrus operator in assert statement, leading to problems with optimized code --- diffdrr/pose.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/diffdrr/pose.py b/diffdrr/pose.py index 92c9dcb2..200473cf 100644 --- a/diffdrr/pose.py +++ b/diffdrr/pose.py @@ -106,7 +106,8 @@ def get_se3_log(self): # %% ../notebooks/api/06_pose.ipynb 7 def make_matrix(R, t): - assert (batch_size := len(R)) == len(t) + batch_size = len(R) + assert batch_size == len(t) matrix = torch.zeros(batch_size, 4, 4).to(R) matrix[..., :3, :3] = R matrix[..., :3, 3] = t