Skip to content

RecursionError in Dendrogram.load_from #166

@GiantMolecularCloud

Description

@GiantMolecularCloud

I computed a dendrogram with 12k structures and saved it as a fits file. When trying to reload this dendrogram I ran into a RecursionError in collect(d) in io/util.py.

The system recursion limit (sys.getrecursionlimit()) on my machine is 3000 and raising the limit to 10000 works around the issue. Interestingly, this error does not occur for another dendrogram with 7600 structures that is also way beyond the limit.

It might be helpful and generally favourable to rewrite the problematic function to use iterations instead of recursions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions