[SciPy-Dev] scipy.spatial comments

Pauli Virtanen pav at iki.fi
Sat Mar 10 20:01:23 EST 2012


Hi,

08.03.2012 13:40, Jaakko Luttinen kirjoitti:
[clip]
> 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,
http://projects.scipy.org/scipy/

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):
http://docs.scipy.org/doc/numpy/dev/gitwash/development_workflow.html
We'll probably improve these how-to-contribute instructions soon-ish.

Cheers,
Pauli




More information about the SciPy-Dev mailing list