Skip to content

Commit

Permalink
fix: KDTree.valid_metrics is method since sklearn 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jvdd committed Jul 25, 2023
1 parent a6c5184 commit aae7647
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions antropy/entropy.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ def svd_entropy(x, order=3, delay=1, normalize=False):
def _app_samp_entropy(x, order, metric="chebyshev", approximate=True):
"""Utility function for `app_entropy`` and `sample_entropy`."""
_all_metrics = KDTree.valid_metrics
_all_metrics = _all_metrics() if callable(_all_metrics) else _all_metrics
if metric not in _all_metrics:
raise ValueError(
"The given metric (%s) is not valid. The valid "
Expand Down

0 comments on commit aae7647

Please sign in to comment.