Skip to content

Argument order in haversine_distances for latitude/longitude #31319

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

Open
wlush opened this issue May 6, 2025 · 0 comments
Open

Argument order in haversine_distances for latitude/longitude #31319

wlush opened this issue May 6, 2025 · 0 comments
Labels
Documentation Needs Triage Issue requires triage

Comments

@wlush
Copy link

wlush commented May 6, 2025

Describe the issue linked to the documentation

Hello! I frequently use sklearn.metrics.pairwise.haversine_distances to estimate distances on the globe. The example on the linked page uses a geographic example, but it does not specify whether geographic coordinates are in (latitude, longitude) or (longitude, latitude) form. From context, one can infer that the correct order is (latitude,longitude); however, it would be useful to explicitly state the order.

This is my first issue submission; please let me know if there is something more that might be useful for resolution!

Suggest a potential alternative/fix

There are two ways that this could be resolved:

  1. Include a short note stating that geographic coordinates should be input as (latitude,longitude)
  2. Include a comment in the example code describing the coordinate order.
@wlush wlush added Documentation Needs Triage Issue requires triage labels May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Needs Triage Issue requires triage
Projects
None yet
Development

No branches or pull requests

1 participant