Skip to content

Commit 7d19a57

Browse files
committed
changed number_of_signal to number_of_signals
removed blank lines in tests
1 parent db1c456 commit 7d19a57

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

Diff for: diffpy/snmf/subroutines.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ def reconstruct_data(components):
466466
467467
"""
468468
signal_length = len(components[0].iq)
469-
number_of_signal = len(components[0].weights)
470-
data_reconstruction = np.zeros((signal_length, number_of_signal))
471-
for signal in range(number_of_signal):
469+
number_of_signals = len(components[0].weights)
470+
data_reconstruction = np.zeros((signal_length, number_of_signals))
471+
for signal in range(number_of_signals):
472472
data_reconstruction[:, signal] = reconstruct_signal(components, signal)
473473
return data_reconstruction

Diff for: diffpy/snmf/tests/test_subroutines.py

-3
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,7 @@ def test_get_residual_matrix(tgrm):
115115
ComponentSignal([0, .25, .5, .75, 1], 2, 2), ComponentSignal([0, .25, .5, .75, 1], 2, 3),
116116
ComponentSignal([0, .25, .5, .75, 1], 2, 4)]),
117117
#([]) # Exception expected
118-
119118
]
120-
121-
122119
@pytest.mark.parametrize('trd', trd)
123120
def test_reconstruct_data(trd):
124121
actual = reconstruct_data(trd)

0 commit comments

Comments
 (0)