Skip to content

Commit

Permalink
fix: shorten all_arrays shape check
Browse files Browse the repository at this point in the history
  • Loading branch information
sbillinge authored Dec 30, 2024
1 parent 6656dab commit 21711fb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/diffpy/utils/diffraction_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,7 @@ def _check_operation_compatibility(self, other):
if not isinstance(other, (DiffractionObject, int, float)):
raise TypeError(invalid_add_type_emsg)
if isinstance(other, DiffractionObject):
self_yarray = self.all_arrays[:, 0]
other_yarray = other.all_arrays[:, 0]
if self_yarray.shape != other_yarray.shape:
if self.all_arrays.shape != other.all_arrays.shape:
raise ValueError(y_grid_length_mismatch_emsg)

@property
Expand Down

0 comments on commit 21711fb

Please sign in to comment.