Skip to content

Commit a5d5c20

Browse files
committed
Fix error in _nearest_neighbor_approx docstring
1 parent 685c241 commit a5d5c20

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

climada/util/coordinates.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,10 +1251,9 @@ def match_centroids(
12511251
"Please provide a coord_gdf (coordinate GeoDataFrame)"
12521252
"object with a valid crs attribute."
12531253
)
1254-
if centroids.crs is None :
1254+
if centroids.crs is None:
12551255
raise ValueError(
1256-
"Please provide centroids "
1257-
"object with a valid crs attribute."
1256+
"Please provide centroids " "object with a valid crs attribute."
12581257
)
12591258
except AttributeError as exc:
12601259
# a crs attribute is needed for unit inference
@@ -1288,8 +1287,8 @@ def _nearest_neighbor_approx(
12881287
centroids, coordinates, unit, threshold, check_antimeridian=True
12891288
):
12901289
"""Compute the nearest centroid for each coordinate using the
1291-
euclidean distance d = ((dlon)cos(lat))^2+(dlat)^2. For distant points
1292-
(e.g. more than 100km apart) use the haversine distance.
1290+
squared equirectangular approximation distance d = ((dlon)cos(lat))^2+(dlat)^2.
1291+
For distant points (e.g. more than 100km apart) use the haversine distance.
12931292
12941293
Parameters
12951294
----------

0 commit comments

Comments
 (0)