Skip to content

**issue:** Handle nan correlation values when using np.corrcoef for belt similarity #268

Description

@Frix-x

issue: Handle nan correlation values when using np.corrcoef for belt similarity

np.corrcoef still returns nan when either PSD is constant/degenerate. That propagates through to similarity_factor and the printed similarity (nan%). Please handle this explicitly (e.g., check np.isnan(correlation) and map it to 0% or a clearer message) before converting to a percentage.

Originally posted by @sourcery-ai[bot] in #265 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions