Skip to content

Commit 924872e

Browse files
committed
test: writting better docstrings and comments
1 parent ead3248 commit 924872e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: src/diffpy/morph/morphs/morphsqueeze.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ class MorphSqueeze(Morph):
2121
>>> from numpy.polynomial import Polynomial
2222
>>> from diffpy.morph.morphs.morphsqueeze import MorphSqueeze
2323
24-
>>> x_morph = np.linspace(0, 10, 101)
2524
>>> x_target = np.linspace(0, 10, 101)
25+
>>> y_target = np.sin(x_target)
26+
>>> x_morph = np.linspace(0, 10, 101)
2627
>>> squeeze_coeff = [0.1, -0.01, 0.005]
2728
>>> poly = Polynomial(squeeze_coeff)
2829
>>> y_morph = np.sin(x_morph + poly(x_morph))
29-
>>> y_target = np.sin(x_target)
3030
3131
>>> morph = MorphSqueeze()
3232
>>> morph.squeeze = squeeze_coeff

Diff for: tests/test_morphsqueeze.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
(np.linspace(0, 10, 101), np.linspace(0, 10, 101)),
3030
# UC4: Target range wider than morph, same grid density
3131
(np.linspace(0, 10, 101), np.linspace(-2, 20, 221)),
32-
# UC6: Target range wider than morph, finer target grid density
32+
# UC6: Target range wider than morph, target grid density finer than morph
3333
(np.linspace(0, 10, 101), np.linspace(-2, 20, 421)),
34-
# UC8: Target range wider than morph, finer morph grid density
34+
# UC8: Target range wider than morph, morph grid density finer than target
3535
(np.linspace(0, 10, 401), np.linspace(-2, 20, 200)),
3636
# UC10: Morph range starts and ends earlier than target, same grid density
3737
(np.linspace(-2, 10, 121), np.linspace(0, 20, 201)),

0 commit comments

Comments
 (0)