Skip to content

Commit 2aadd27

Browse files
minor fix
1 parent a27e9e5 commit 2aadd27

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

gpudrive/datatypes/trajectory.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ def __init__(
157157
self.mean_x = mean_pos_xy[:, 0]
158158
self.mean_y = mean_pos_xy[:, 1]
159159

160-
self.demean_positions()
161-
162160
@classmethod
163161
def from_tensor(
164162
cls,
@@ -195,8 +193,8 @@ def demean_positions(self):
195193
mean_y_reshaped = self.mean_y.view(-1, 1, 1)
196194

197195
# Apply to x and y coordinates
198-
self.pos_xy[..., 0] -= mean_x_reshaped
199-
self.pos_xy[..., 1] -= mean_y_reshaped
196+
self.pos_xy[..., 10:, 0] -= mean_x_reshaped
197+
self.pos_xy[..., 10:, 1] -= mean_y_reshaped
200198

201199
self.pos_x = self.pos_xy[..., 0].unsqueeze(-1)
202200
self.pos_y = self.pos_xy[..., 1].unsqueeze(-1)

0 commit comments

Comments
 (0)