Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/weather_model_graphs/create/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""
f"""
Generic routines for creating the graph components used in the message-passing
graph, and for connecting nodes across these component graphs.

Expand Down Expand Up @@ -333,6 +333,8 @@ def _find_neighbour_node_idxs_in_source_mesh(xy_target):
if max_num_neighbours is None:
raise Exception(
"to use `nearest_neighbours` you should set the max number with `max_num_neighbours`"
neigh_idxs = np.atleast_1d(neigh_idxs)

)
if max_dist is not None or rel_max_dist is not None:
raise Exception(
Expand All @@ -341,6 +343,7 @@ def _find_neighbour_node_idxs_in_source_mesh(xy_target):

def _find_neighbour_node_idxs_in_source_mesh(xy_target):
neigh_idxs = kdt_s.query(xy_target, max_num_neighbours)[1]
neigh_idxs = np.atleast_1d(neigh_idxs)
return neigh_idxs

elif method == "within_radius":
Expand Down