Skip to content

Commit 737c133

Browse files
committed
added squeeze to get rid of excess dimension and fixed shape
1 parent 6ac88d3 commit 737c133

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

weldx/transformations/local_cs.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -748,11 +748,11 @@ def as_homogeneous_matrix(self, translation_unit: QuantityLike) -> np.ndarray:
748748
translation = np.resize(
749749
self.coordinates.data.to(translation_unit).m, (time_dim, 3)
750750
)
751-
homogeneous_matrix = np.zeros((time_dim, 4, 4))
751+
homogeneous_matrix = np.resize(np.identity(4), (time_dim, 4, 4))
752752
homogeneous_matrix[:, :3, :3] = rotation
753753
homogeneous_matrix[:, :3, 3] = translation
754754

755-
return homogeneous_matrix
755+
return np.squeeze(homogeneous_matrix)
756756

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

0 commit comments

Comments
 (0)