Skip to content

Commit f4af203

Browse files
committed
debug Group.retarget_to() : inverted self.axis.equals(target_axis) or isinstance(self.axis, int)
1 parent 6d15abe commit f4af203

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

larray/core/group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ def retarget_to(self, target_axis):
829829
raise ValueError('cannot retarget a Group defined without a real axis object (e.g. using '
830830
'an AxisReference (x.)) to an axis with a different name')
831831
return self.__class__(self.key, self.name, target_axis)
832-
elif self.axis.equals(target_axis) or isinstance(self.axis, int):
832+
elif isinstance(self.axis, int) or self.axis.equals(target_axis):
833833
# in the case of isinstance(self.axis, int), we can only hope the axis corresponds. This is the
834834
# case if we come from _translate_axis_key_chunk, but if the users calls this manually, we cannot know.
835835
# XXX: maybe changing this to retarget_to_axes would be a good idea after all?

0 commit comments

Comments
 (0)