From f6ea9f146b32085fcdda5d58fda47b2c5e18221a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:20:29 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/probeinterface/probegroup.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/probeinterface/probegroup.py b/src/probeinterface/probegroup.py index f9b3c14..c5fd2d2 100644 --- a/src/probeinterface/probegroup.py +++ b/src/probeinterface/probegroup.py @@ -15,14 +15,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) @@ -37,8 +37,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) @@ -167,7 +168,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 @@ -190,7 +191,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 @@ -218,7 +219,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):