-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add haversine cdist #30
Comments
Hi, Thanks ! If your issue is with performance, #26 added the You can see how to use it in the documentation If that's not performance-related, can you explain why you need this ? |
cdist is constructing a n times m matrix for two input arrays with n and m points respectively. The vector version does not do this. |
OK so let me rephrase to make sure I understand your needs : You have a list of geopoints, and you need to calculate the distance between every points : pseudo-code : LYON = (45.7597, 4.8422)
PARIS = (48.8567, 2.3508)
NEW_YORK = (40.7033962, -74.2351462)
calculate_each_distances([LYON, PARIS, NEW_YORK]) and the output should be something like that :
Is that it ? |
Almost. This is the pdist functionality. One step further is, to provide two lists of points for rows and cols in the resulting matrix. |
This already exists, see haversine/tests/test_haversine_vector.py Lines 21 to 30 in 0b47ac4
However, I believe the |
@Noezor help yourself! Every improvement in the documentation is helpful 👍 |
Hey there,
nice package! I was wondering, if you could implement a routine to compute a pairwise distance matrix like
scipy.spatial.distance.cdist
does.Cheers,
Sebastian
The text was updated successfully, but these errors were encountered: