Skip to content

Commit

Permalink
fix kernel size should be smaller than volume size (memory corruption…
Browse files Browse the repository at this point in the history
… bug)
  • Loading branch information
xoolive committed Jan 17, 2025
1 parent 2a31501 commit 26db74e
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 86 deletions.
3 changes: 3 additions & 0 deletions src/traffic/algorithms/filters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ def apply(self, data: pd.DataFrame) -> pd.DataFrame:
kernels = tuple(kernels)

for size in kernels:
if size > data.shape[0]:
continue

# Prepare each feature for the filtering
df = self.cascaded_filters(
data[["timestamp", column]], column, size
Expand Down
Loading

0 comments on commit 26db74e

Please sign in to comment.