Skip to content

[BUG] SFA.get_words() and SFAFast.get_words() crash for any normal sliding-window configuration#3609

Open
patrickzib wants to merge 8 commits into
mainfrom
PS/fix_get_words
Open

[BUG] SFA.get_words() and SFAFast.get_words() crash for any normal sliding-window configuration#3609
patrickzib wants to merge 8 commits into
mainfrom
PS/fix_get_words

Conversation

@patrickzib

Copy link
Copy Markdown
Contributor

Fixes #3537

SFA.get_words() and SFAFast.get_words() crashed when window_size < n_timepoints (the normal sliding-window configuration). Now fixed

Changes

  • aeon/transformations/collection/dictionary_based/_sfa.py:
  • aeon/transformations/collection/dictionary_based/_sfa_fast.py
  • aeon/transformations/collection/dictionary_based/tests/test_sfa.py: Add new regression tests covering sliding window

Testing

All tests in test_sfa.py pass

@patrickzib patrickzib requested a review from TonyBagnall July 6, 2026 11:33
@patrickzib patrickzib added bug Something isn't working transformations Transformations package labels Jul 6, 2026
@aeon-actions-bot

Copy link
Copy Markdown
Contributor

Thank you for contributing to aeon

I did not find any labels to add based on the title. Please add the [ENH], [MNT], [BUG], [DOC], [REF], [DEP] and/or [GOV] tags to your pull requests titles. For now you can add the labels manually.
I would have added the following labels to this PR based on the changes made: [ transformations ], however some package labels are already present.

The Checks tab will show the status of our automated tests. You can click on individual test runs in the tab or "Details" in the panel below to see more information if there is a failure.

If our pre-commit code quality check fails, please run pre-commit locally and push the fixes to your PR branch.

Don't hesitate to ask questions on the aeon Discord channel if you have any.

PR CI actions

These checkboxes will add labels to enable or disable CI functionality for this PR. This may not take effect immediately, and a new commit may be required to run the new configuration.

  • Run pre-commit checks for all files
  • Run mypy typecheck tests
  • Run all pytest tests and configurations
  • Run all notebook example tests
  • Run numba-disabled codecov tests
  • Disable numba cache loading
  • Regenerate expected results for testing
  • Push an empty commit to re-run CI checks

@TonyBagnall TonyBagnall changed the title Fix: SFA.get_words() and SFAFast.get_words() crash for any normal sliding-window configuration [BUG] SFA.get_words() and SFAFast.get_words() crash for any normal sliding-window configuration Jul 6, 2026
@TonyBagnall TonyBagnall added the codecov actions Run the codecov action on a PR label Jul 8, 2026

@TonyBagnall TonyBagnall left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix, but new get_chars helper mutates the input words array while decoding it, by shifting each word in place. A getter shouldnt mutate the state of the object imo

Comment thread aeon/transformations/collection/dictionary_based/_sfa.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working codecov actions Run the codecov action on a PR transformations Transformations package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] SFA.get_words() and SFAFast.get_words() crash for any normal sliding-window configuration

2 participants