Skip to content

Commit 54c8565

Browse files
author
luseverin
committed
Correct error in logger warning
1 parent 5d53512 commit 54c8565

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

climada/util/coordinates.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,10 +1454,7 @@ def _nearest_neighbor_haversine(centroids, coordinates, unit, threshold):
14541454
num_warn = np.sum(dist > threshold)
14551455
if num_warn:
14561456
LOGGER.warning(
1457-
"Distance to closest centroid is greater than %s",
1458-
"km for %s coordinates.",
1459-
threshold,
1460-
num_warn,
1457+
f"Distance to closest centroid is greater than {threshold} km for {num_warn} coordinates."
14611458
)
14621459
assigned[dist > threshold] = -1
14631460

@@ -1510,10 +1507,7 @@ def _nearest_neighbor_euclidean(
15101507
num_warn = np.sum(dist > threshold)
15111508
if num_warn:
15121509
LOGGER.warning(
1513-
"Distance to closest centroid is greater than %s",
1514-
"km for %s coordinates.",
1515-
threshold,
1516-
num_warn,
1510+
f"Distance to closest centroid is greater than {threshold} km for {num_warn} coordinates."
15171511
)
15181512
assigned[dist > threshold] = -1
15191513

0 commit comments

Comments
 (0)