Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more metrics in cdist and pdist #66

Merged
merged 1 commit into from
Sep 30, 2017
Merged

Conversation

jakirkham
Copy link
Owner

Adds support for the mahalanobis, seuclidean, and wminkowski metrics in cdist and pdist. Includes supporting default arguments for these different metrics in cdist and pdist as needed. Provides tests against the SciPy equivalents for all of these functions and metrics with and without default arguments filled in.

@jakirkham jakirkham force-pushed the dist_more_metrics branch 2 times, most recently from 6bcf9f9 to 8062d32 Compare September 30, 2017 01:16
Adds support for the `mahalanobis`, `seuclidean`, and `wminkowski`
metrics in `cdist` and `pdist`. Includes supporting default arguments
for these different metrics in `cdist` and `pdist` as needed. Provides
tests against the SciPy equivalents for all of these functions and
metrics with and without default arguments filled in.
elif kw["V"] is None:
kw.pop("V")
elif metric == "wminkowski":
kw["w"] = np.random.random(u_shape[-1:])
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were unable to test negative values as well due to issue ( scipy/scipy#7953 ).

elif kw["V"] is None:
kw.pop("V")
elif metric == "wminkowski":
kw["w"] = np.random.random(u_shape[-1:])
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were unable to test negative values as well due to issue ( scipy/scipy#7953 ).

@jakirkham jakirkham merged commit 5d26db9 into master Sep 30, 2017
@jakirkham jakirkham deleted the dist_more_metrics branch September 30, 2017 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant