Skip to content

Commit a670fe5

Browse files
committed
Enable slicing transforms
1 parent a17570c commit a670fe5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/pytorch_kinematics/transforms/transform3d.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ def __init__(
218218
def __len__(self):
219219
return self.get_matrix().shape[0]
220220

221+
def __getitem__(self, item):
222+
return Transform3d(matrix=self.get_matrix()[item])
223+
221224
def __repr__(self):
222225
m = self.get_matrix()
223226
pos = m[:, :3, 3]

0 commit comments

Comments
 (0)