Skip to content
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

RuntimeWarning: invalid value encountered in cast #201

Closed
theroggy opened this issue Aug 7, 2023 · 3 comments
Closed

RuntimeWarning: invalid value encountered in cast #201

theroggy opened this issue Aug 7, 2023 · 3 comments

Comments

@theroggy
Copy link
Contributor

theroggy commented Aug 7, 2023

Dedup gives a RuntimeWarning in some cases because in those cases one of the values in array_bk_sarcs is nan.

Script to reproduce:

import geopandas as gpd
import topojson

url = "https://github.com/geofileops/geofileops/raw/main/tests/data/polygon-parcel.gpkg"
gdf = gpd.read_file(url, driver="GPKG")
topo = topojson.Topology(gdf, topoquantize=False)
print("Ready")

Warning:

/home/runner/micromamba-root/envs/test/lib/python3.10/site-packages/topojson/core/dedup.py:107: RuntimeWarning: invalid value encountered in cast
    data["bookkeeping_shared_arcs"] = array_bk_sarcs.astype(np.int64).tolist()
@mattijn
Copy link
Owner

mattijn commented Aug 11, 2023

Thanks for reporting the issue. Currently a few days out and only available on mobile. Will come back soon to this! Thanks again for reporting!

@olofevenvik
Copy link

I got the same issue!
and this guy as well: topojson/topojson#342

@mattijn
Copy link
Owner

mattijn commented Sep 20, 2023

Fixed by #202

@mattijn mattijn closed this as completed Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants