shape-similarity icon indicating copy to clipboard operation
shape-similarity copied to clipboard

error

Open nponts opened this issue 5 months ago • 0 comments

Hi, The tools looks awesome however I run into a division by zero error:

File /opt/miniconda3/envs/jupyterlab/lib/python3.12/site-packages/shapesimilarity/shapesimilarity.py:40, in shape_similarity(shape1, shape2, rotations, checkRotation) 38 min_frechet_distance = frechet_dist 39 # divide by Math.sqrt(2) to try to get the low results closer to ---> 40 result = max(1 - min_frechet_distance / (geo_avg_curve_len / math.sqrt(2)), 0) 41 return round(result, 4)

ZeroDivisionError: float division by zero

I checked my input and I really don't see what's wrong... Help please!

nponts avatar Jan 09 '24 11:01 nponts