Skip to content

Commit df8e557

Browse files
authored
change np.NaN to np.nan (#82)
* change np.NaN to np.nan Testing this threw an error using numpy 2.0, which says np.NaN has been replaced by np.nan * change comparison to np.nan to .notna() As recommended in #82 (review) * Remove ununsed numpy import
1 parent a51433d commit df8e557

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/assign_images.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import geopandas as gpd
77
from loguru import logger as log
8-
import numpy as np
98
from pandas import Series
109
from requests.exceptions import HTTPError
1110
from tenacity import RetryError
@@ -97,7 +96,7 @@ def main(
9796
log.info(gdf.head())
9897
log.info(
9998
"Are There Duplicates? {}",
100-
gdf[gdf["image_id"] is not None and gdf["image_id"] != np.NaN]["image_id"]
99+
gdf[gdf["image_id"] is not None and gdf["image_id"].notna()]["image_id"]
101100
.duplicated()
102101
.any(),
103102
)

0 commit comments

Comments
 (0)