Skip to content

Commit

Permalink
fix minor issue with numpy-2.0 regression
Browse files Browse the repository at this point in the history
  • Loading branch information
mwtoews committed Jun 17, 2024
1 parent 0370215 commit eff9f20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions swn/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def from_lines(cls, lines, polygons=None):
if jout.size > 0:
# Just evaluate 2D tuple to find segnums with same location
outsets = (
jout.assign(xy=jout.out.map(lambda g: (g.x, g.y)))
jout.assign(xy=jout.out.map(lambda g: (float(g.x), float(g.y))))
.drop(columns="out")
.groupby("xy")
.agg(set)
Expand Down Expand Up @@ -328,7 +328,7 @@ def from_lines(cls, lines, polygons=None):
obj.jhw = jhw
if jhw.size > 0:
hwsets = (
jhw.assign(xy=jhw.hw.map(lambda g: (g.x, g.y)))
jhw.assign(xy=jhw.hw.map(lambda g: (float(g.x), float(g.y))))
.drop(columns="hw")
.groupby("xy")
.agg(set)
Expand Down

0 comments on commit eff9f20

Please sign in to comment.