Skip to content

Fix unidip RecursionError#64

Open
awgymer wants to merge 1 commit intofritzsedlazeck:mainfrom
awgymer:fix-unidip-recursionerror
Open

Fix unidip RecursionError#64
awgymer wants to merge 1 commit intofritzsedlazeck:mainfrom
awgymer:fix-unidip-recursionerror

Conversation

@awgymer
Copy link

@awgymer awgymer commented Feb 13, 2026

There is a problem with the UniDip._unidip method which means that for very large and noisy datasets you can get a recursion error.

One way to avoid this is to remove the recursive function calls. This PR does that by converting the method to use a while loop and a manually controlled stack.

There are no tests for this repository but I have tested with the test suite in the original UniDip implementation repository (source and this code generates the same outputs as the original for the test suite.

Closes #24

… recursion in order to avoid RecursionError on very large datasets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RecursionError: maximum recursion depth exceeded in comparison

1 participant