Skip to content

Commit

Permalink
What is mypys problem?
Browse files Browse the repository at this point in the history
  • Loading branch information
mbwinkler committed Nov 5, 2024
1 parent dcafa97 commit 1a71dfc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions weldx/transformations/local_cs.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,13 +575,15 @@ def from_homogeneous_transformation(
"""
if isinstance(transformation_matrix, xr.DataArray):
transformation_matrix = transformation_matrix.data
transformation_matrix = np.array(transformation_matrix.data)
if transformation_matrix.ndim == 3:
orientation = transformation_matrix[:, :3, :3]
coordinates = Q_(transformation_matrix[:, :3, 3], translation_unit)
coordinates = transformation_matrix[:, :3, 3]
coordinates = Q_(coordinates, translation_unit)
else:
orientation = transformation_matrix[:3, :3]
coordinates = Q_(transformation_matrix[:3, 3], translation_unit)
coordinates = transformation_matrix[:3, 3]
coordinates = Q_(coordinates, translation_unit)
return cls(orientation, coordinates=coordinates, time=time, time_ref=time_ref)

@property
Expand Down

0 comments on commit 1a71dfc

Please sign in to comment.