Skip to content

Commit

Permalink
change np.NaN to np.nan (#82)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ioalexei authored Oct 8, 2024
1 parent a51433d commit df8e557
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/assign_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import geopandas as gpd
from loguru import logger as log
import numpy as np
from pandas import Series
from requests.exceptions import HTTPError
from tenacity import RetryError
Expand Down Expand Up @@ -97,7 +96,7 @@ def main(
log.info(gdf.head())
log.info(
"Are There Duplicates? {}",
gdf[gdf["image_id"] is not None and gdf["image_id"] != np.NaN]["image_id"]
gdf[gdf["image_id"] is not None and gdf["image_id"].notna()]["image_id"]
.duplicated()
.any(),
)
Expand Down

0 comments on commit df8e557

Please sign in to comment.