Skip to content

Commit

Permalink
added squeeze to get rid of excess dimension and fixed shape
Browse files Browse the repository at this point in the history
  • Loading branch information
mbwinkler committed Nov 3, 2024
1 parent 6ac88d3 commit 737c133
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions weldx/transformations/local_cs.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,11 +748,11 @@ def as_homogeneous_matrix(self, translation_unit: QuantityLike) -> np.ndarray:
translation = np.resize(
self.coordinates.data.to(translation_unit).m, (time_dim, 3)
)
homogeneous_matrix = np.zeros((time_dim, 4, 4))
homogeneous_matrix = np.resize(np.identity(4), (time_dim, 4, 4))
homogeneous_matrix[:, :3, :3] = rotation
homogeneous_matrix[:, :3, 3] = translation

return homogeneous_matrix
return np.squeeze(homogeneous_matrix)

def _interp_time_orientation(self, time: Time) -> xr.DataArray:
"""Interpolate the orientation in time."""
Expand Down

0 comments on commit 737c133

Please sign in to comment.