@@ -288,8 +288,12 @@ def test_index_selector_with_wavenumbers_and_dataframe():
288
288
def test_index_shift_constant_fill ():
289
289
# Arrange
290
290
spectrum = np .array ([[5 , 4 , 3 , 2 , 1 , 2 , 1 , 2 , 3 , 4 , 5 ]])
291
- spectrum_positive_shift = IndexShift (shift = 1 , fill_method = "constant" , random_state = 44 )
292
- spectrum_negative_shift = IndexShift (shift = 1 , fill_method = "constant" , random_state = 42 )
291
+ spectrum_positive_shift = IndexShift (
292
+ shift = 1 , fill_method = "constant" , random_state = 44
293
+ )
294
+ spectrum_negative_shift = IndexShift (
295
+ shift = 1 , fill_method = "constant" , random_state = 42
296
+ )
293
297
294
298
# Act
295
299
spectrum_positive_shifted = spectrum_positive_shift .fit_transform (spectrum )
@@ -318,11 +322,16 @@ def test_index_shift_linear_fill():
318
322
assert np .isclose (spectrum_positive_shifted [0 ][0 ], 6.0 , atol = 1e-6 )
319
323
assert np .isclose (spectrum_negative_shifted [0 ][- 1 ], 6.0 , atol = 1e-6 )
320
324
325
+
321
326
def test_index_shift_quadratic_fill ():
322
327
# Arrange
323
328
spectrum = np .array ([[5 , 4 , 3 , 2 , 1 , 2 , 1 , 4 , 9 , 16 , 25 ]])
324
- spectrum_positive_shift = IndexShift (shift = 1 , fill_method = "quadratic" , random_state = 44 )
325
- spectrum_negative_shift = IndexShift (shift = 1 , fill_method = "quadratic" , random_state = 42 )
329
+ spectrum_positive_shift = IndexShift (
330
+ shift = 1 , fill_method = "quadratic" , random_state = 44
331
+ )
332
+ spectrum_negative_shift = IndexShift (
333
+ shift = 1 , fill_method = "quadratic" , random_state = 42
334
+ )
326
335
327
336
# Act
328
337
spectrum_positive_shifted = spectrum_positive_shift .fit_transform (spectrum )
@@ -334,6 +343,7 @@ def test_index_shift_quadratic_fill():
334
343
assert np .isclose (spectrum_positive_shifted [0 ][0 ], 6.0 , atol = 1e-6 )
335
344
assert np .isclose (spectrum_negative_shifted [0 ][- 1 ], 36.0 , atol = 1e-6 )
336
345
346
+
337
347
def test_l1_norm (spectrum ):
338
348
# Arrange
339
349
norm = 1
0 commit comments