Skip to content

Commit a6d3fee

Browse files
committed
Reverse order of nodes in Graph.nodes
1 parent f8491b4 commit a6d3fee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spatial_graph/graph/wrapper_template.pyx

+3-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ cdef class Graph:
277277
node_ids[i] = deref(it)
278278
inc(it)
279279

280-
return node_ids
280+
# graph_lite iterates over nodes in reverse order of addition, fix that
281+
# here
282+
return node_ids[::-1]
281283

282284
%if $directed
283285
%set $prefixes=["in_", "out_"]

0 commit comments

Comments
 (0)