diff --git a/src/probeinterface/probe.py b/src/probeinterface/probe.py index 0d7f0d0c..b45fcd16 100644 --- a/src/probeinterface/probe.py +++ b/src/probeinterface/probe.py @@ -1498,9 +1498,9 @@ def get_slice(self, selection: np.ndarray[bool | int]): selection = np.asarray(selection) if selection.dtype == "bool": - assert selection.shape == (n,), ( - f"if array of bool given it must be the same size " "as the number of contacts {selection.shape} != {n}" - ) + assert selection.shape == ( + n, + ), f"if array of bool given it must be the same size as the number of contacts {selection.shape} != {n}" elif selection.dtype.kind == "i": assert np.unique(selection).size == selection.size assert 0 <= np.min(selection) < n, f"An index within your selection is out of bounds {np.min(selection)}"