Skip to content

Commit

Permalink
Minor simplification in DistanceMatrixDFCache
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Panchenko committed Feb 28, 2024
1 parent d1844b0 commit 1776f62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sensai/distance_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def get(self, key: Tuple[Union[str, int], Union[str, int]]) -> TValue:
except KeyError:
return None
result = self.distance_df.iloc[pos1, pos2]
if result is None or np.isnan(result):
if np.isnan(result):
return None
return result

Expand Down

0 comments on commit 1776f62

Please sign in to comment.