You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File Anaconda3\envs\geo_new\lib\site-packages\libpysal\weights\distance.py:905, in DistanceBand.from_dataframe(cls, df, threshold, geom_col, ids, **kwargs)
903 if geom_col is None:
904 geom_col = df.geometry.name
--> 905 pts = get_points_array(df[geom_col])
906 if ids is None:
907 ids = df.index.tolist()
File Anaconda3\envs\geo_new\lib\site-packages\libpysal\weights\util.py:1081, in get_points_array(iterable)
1078 try:
1079 if HAS_SHAPELY:
1080 data = np.vstack(
-> 1081 [
1082 np.array(shape.centroid.coords)[0]
1083 if isinstance(shape, BaseGeometry)
1084 else np.array(shape.centroid)
1085 for shape in first_choice
1086 ]
...
1092 for shape in first_choice
1093 ]
1094 )
IndexError: index 0 is out of bounds for axis 0 with size
The error disappears, when I restrict the geodataframe to areas without islands.
The text was updated successfully, but these errors were encountered:
raholler
changed the title
Creating Weighting Matrix from dataframe: IndexError: index 0 is out of bounds for axis 0 with size 0
Creating Weights from dataframe: IndexError: index 0 is out of bounds for axis 0 with size 0
Oct 16, 2022
I get the following error when running
The error disappears, when I restrict the geodataframe to areas without islands.
test.zip
The text was updated successfully, but these errors were encountered: