Skip to content

Commit 21711fb

Browse files
authored
fix: shorten all_arrays shape check
1 parent 6656dab commit 21711fb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/diffpy/utils/diffraction_objects.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,7 @@ def _check_operation_compatibility(self, other):
254254
if not isinstance(other, (DiffractionObject, int, float)):
255255
raise TypeError(invalid_add_type_emsg)
256256
if isinstance(other, DiffractionObject):
257-
self_yarray = self.all_arrays[:, 0]
258-
other_yarray = other.all_arrays[:, 0]
259-
if self_yarray.shape != other_yarray.shape:
257+
if self.all_arrays.shape != other.all_arrays.shape:
260258
raise ValueError(y_grid_length_mismatch_emsg)
261259

262260
@property

0 commit comments

Comments
 (0)