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)
issue: Handle
nancorrelation values when usingnp.corrcoeffor belt similaritynp.corrcoefstill returnsnanwhen either PSD is constant/degenerate. That propagates through tosimilarity_factorand the printed similarity (nan%). Please handle this explicitly (e.g., checknp.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)