Skip to content

Commit

Permalink
BUG: fix Wuhan crash (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfleis authored Dec 10, 2024
1 parent 5fade1e commit fd6e747
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions neatnet/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,7 @@ def _rotate_loop_coords(
loop_points.geometry, predicate="dwithin", distance=1e-4
)

_shared_node = loop_points.loc[loop_points_ix].geometry.get_coordinates().values
new_start = np.unique(_shared_node, axis=0)
new_start = loop_points.loc[loop_points_ix].geometry.mode().get_coordinates().values
_coords_match = (loop_coords == new_start).all(axis=1)
new_start_idx = np.where(_coords_match)[0].squeeze()

Expand Down

0 comments on commit fd6e747

Please sign in to comment.