We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d4841b commit 5d0ebccCopy full SHA for 5d0ebcc
src/diffpy/utils/diffraction_objects.py
@@ -196,7 +196,16 @@ def __add__(self, other):
196
Raised when the length of the xarrays of the two DiffractionObject instances do not match.
197
TypeError
198
Raised when the type of `other` is not an instance of DiffractionObject, int, or float.
199
+
200
+ Examples
201
+ --------
202
+ Add a scalar value to the xarrays of the DiffractionObject instance:
203
+ >>> new_do = my_do + 10.1
204
205
+ Add the xarrays of two DiffractionObject instances:
206
+ >>> new_do = my_do_1 + my_do_2
207
"""
208
209
summed_do = deepcopy(self)
210
# Add scalar value to all xarrays by broadcasting
211
if isinstance(other, (int, float)):
0 commit comments