diff --git a/src/probeinterface/probegroup.py b/src/probeinterface/probegroup.py index 4f2b41e..fc95a3f 100644 --- a/src/probeinterface/probegroup.py +++ b/src/probeinterface/probegroup.py @@ -16,14 +16,14 @@ def __init__(self): self.probes = [] def add_probe(self, probe: Probe): - """ + """ Add an additional probe to the ProbeGroup Parameters ---------- probe: Probe The probe to add to the ProbeGroup - + """ if len(self.probes) > 0: self._check_compatible(probe) @@ -38,8 +38,9 @@ def _check_compatible(self, probe: Probe): ) if probe.ndim != self.probes[-1].ndim: - raise ValueError(f"ndim are not compatible: probe.ndim {probe.ndim} " - f"!= probegroup ndim {self.probes[-1].ndim}") + raise ValueError( + f"ndim are not compatible: probe.ndim {probe.ndim} " f"!= probegroup ndim {self.probes[-1].ndim}" + ) # check global channel maps self.probes.append(probe) @@ -168,7 +169,7 @@ def to_dict(self, array_as_list: bool = False): return d @staticmethod - def from_dict(d:dict): + def from_dict(d: dict): """Instantiate a ProbeGroup from a dictionary Parameters @@ -191,7 +192,7 @@ def get_global_device_channel_indices(self) -> np.ndarray: """ Gets the global device channels indices and returns as an array - + Returns ------- channels: np.ndarray @@ -221,7 +222,9 @@ def set_global_device_channel_indices(self, channels: np.array | list): """ channels = np.asarray(channels) if channels.size != self.get_contact_count(): - raise ValueError(f"Wrong channels size {channels.size} for the number of channels {self.get_contact_count()}") + raise ValueError( + f"Wrong channels size {channels.size} for the number of channels {self.get_contact_count()}" + ) # first reset previsous indices for i, probe in enumerate(self.probes):