Skip to content

Commit

Permalink
Merge pull request #284 from Dhanvantari/patch-1
Browse files Browse the repository at this point in the history
Bug-Fix: TypeError in _get_numbers_distance()  when ignore_order = True
  • Loading branch information
seperman authored Dec 17, 2021
2 parents 8bb7206 + 6b7ee52 commit e2de588
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepdiff/distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ def _get_numbers_distance(num1, num2, max_=1):
"""
if num1 == num2:
return 0
if isinstance(num1, float):
if not isinstance(num1, float):
num1 = float(num1)
if isinstance(num2, float):
if not isinstance(num2, float):
num2 = float(num2)
# Since we have a default cutoff of 0.3 distance when
# getting the pairs of items during the ingore_order=True
Expand Down

0 comments on commit e2de588

Please sign in to comment.