Skip to content

Commit c142240

Browse files
authored
tweak array length error message
1 parent 0e362c1 commit c142240

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/diffpy/utils/diffraction_objects.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ def __init__(
9999
def _input_data(self, xarray, yarray, xtype, wavelength, scat_quantity, name, metadata):
100100
if xtype not in XQUANTITIES:
101101
raise ValueError(_xtype_wmsg(xtype))
102-
# Check xarray and yarray have the same length
103102
if len(xarray) != len(yarray):
104103
raise ValueError(
105-
"'xarray' and 'yarray' must have the same length. "
106-
"Please re-initialize 'DiffractionObject' or re-run the method 'input_data' "
107-
"with 'xarray' and 'yarray' of identical length."
104+
"'xarray' and 'yarray' are different lengths. They must "
105+
"correspond to each other and have the same length. "
106+
"Please re-initialize 'DiffractionObject'
107+
"with valid 'xarray' and 'yarray's"
108108
)
109109
self.scat_quantity = scat_quantity
110110
self.wavelength = wavelength

0 commit comments

Comments
 (0)