Skip to content

Commit 49c13b2

Browse files
committed
Refactor and enhance docstrings across multiple modules
1 parent 7c8219b commit 49c13b2

File tree

6 files changed

+533
-5791
lines changed

6 files changed

+533
-5791
lines changed

src/ethoscopy/behavpy_core.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1077,9 +1077,9 @@ def curate_dead_animals(self, t_column: str = 't', mov_column: str = 'moving', t
10771077
ValueError: If resolution is not positive or larger than time_window
10781078
TypeError: If mov_column does not contain boolean values
10791079
"""
1080-
# Check
1081-
if not pd.api.types.is_bool_dtype(self[mov_column]):
1082-
raise TypeError(f'Column {mov_column} must contain boolean values')
1080+
# # Check
1081+
# if not pd.api.types.is_bool_dtype(self[mov_column]):
1082+
# raise TypeError(f'Column {mov_column} must contain boolean values')
10831083

10841084
tdf = self.reset_index().copy(deep=True)
10851085
return self.__class__(tdf.groupby('id', group_keys = False).apply(
@@ -1133,9 +1133,9 @@ def curate_filter(df: pd.DataFrame, dict: Dict[str, List[int]]) -> pd.DataFrame:
11331133
return pd.DataFrame() # Return empty frame for missing IDs
11341134
return df[df[t_column].between(dict[specimen_id][0], dict[specimen_id][1])]
11351135

1136-
# Validate movement column contains boolean values
1137-
if not pd.api.types.is_bool_dtype(mov_df[mov_column]):
1138-
raise TypeError(f'Column {mov_column} must contain boolean values')
1136+
# # Validate movement column contains boolean values
1137+
# if not pd.api.types.is_bool_dtype(mov_df[mov_column]):
1138+
# raise TypeError(f'Column {mov_column} must contain boolean values')
11391139

11401140
# Check ID consistency
11411141
interaction_ids = set(self.index.unique())

0 commit comments

Comments
 (0)