From 0b924c6884154bc72e78f8f7437ac89768d49eb1 Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Fri, 31 Dec 2021 17:24:47 -0500 Subject: [PATCH] Fix elecs region (#195) * move tests outside the nwbwidgets package * add test for StartAndDurationController * fix for when electrodes selects subregion of electrodes table --- nwbwidgets/controllers/group_and_sort_controllers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nwbwidgets/controllers/group_and_sort_controllers.py b/nwbwidgets/controllers/group_and_sort_controllers.py index 4843f335..b5cbf7e8 100644 --- a/nwbwidgets/controllers/group_and_sort_controllers.py +++ b/nwbwidgets/controllers/group_and_sort_controllers.py @@ -204,7 +204,7 @@ def set_group_by(self, group_by): if self.column_values is not None: self.group_sm.layout.visibility = "visible" self.group_sm.layout.width = "100px" - keep_column_values = self.column_values[self.keep_rows] + keep_column_values = self.column_values if self.column_values.dtype == np.float: keep_column_values = keep_column_values[~np.isnan(keep_column_values)] groups = np.unique(keep_column_values) @@ -319,13 +319,13 @@ def range_controller_observer(self, change): def get_groups(self): return infer_categorical_columns(self.dynamic_table, self.keep_rows) - def get_column_values(self, column_name, rows_select=None): + def get_column_values(self, column_name: str, rows_select=None): """Get the values of the group_by variable Parameters ---------- - by - units_select + column_name: str + rows_select Returns -------