Exemple #1
0
 def test_bool_invert(self):
     peak_array = np.empty((2, 3), dtype=object)
     bool_array = np.empty((2, 3), dtype=object)
     peak_array[0, 0] = [[2, 4], [1, 9], [4, 5]]
     peak_array[0, 1] = [[8, 2]]
     bool_array[0, 0] = [True, False, True]
     bool_array[0, 1] = [True]
     peak_array_filter = mt._filter_peak_array_with_bool_array(
         peak_array, bool_array, bool_invert=True)
     assert len(peak_array_filter[0, 0]) == 1
     assert_equal(peak_array_filter[0, 0], [[1, 9]])
     assert len(peak_array_filter[0, 1]) == 0
Exemple #2
0
 def test_wrong_size_input(self):
     peak_array, bool_array = np.empty((2, 4)), np.empty((2, 3))
     with pytest.raises(ValueError):
         mt._filter_peak_array_with_bool_array(peak_array, bool_array)