[SciPy-Dev] scipy.spatial comments
Sat Mar 10 19:01:23 CST 2012
08.03.2012 13:40, Jaakko Luttinen kirjoitti:
> First, scipy/spatial/src/distance.c contains several interesting
> distance measures. However, the vector versions are not visible outside
> the file because they are not declared in distance.h (for instance,
> euclidean_distance). Only the pdist_* and cdist_* versions are made
> visible. I would like to use the "raw" distance measures directly for
> some other functions, so would it be ok to introduce those in distance.h?
Do you want to expose these functions so that they could be used from
Python, or do you mean something else?
Exposing them to Python requires also writing some additional wrappers
in distance_wrap.c, but those seem pretty straightforward to add.
Once you got what you like, you can either send in a pull request, or
file an enhancement ticket with the patch attached in our tracker,
The pull request route is recommended as it allows for easier follow-up
discussion &c. but there's some learning curve ahead if you have never
worked with Git before. Some help can be found here (just substitute
numpy -> scipy everywhere):
We'll probably improve these how-to-contribute instructions soon-ish.
More information about the SciPy-Dev