Skip to content

Commit

Permalink
fix: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
askorupka committed Oct 11, 2024
1 parent ed513dc commit 9b8301a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion GNNGraphs/src/sampling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function sample_neighbors(g::GNNGraph{<:COO_T}, nodes, K = -1;
graph_indicator,
ndata, edata, g.gdata)
end
return gnew
return gne
end

"""
Expand Down
9 changes: 4 additions & 5 deletions GNNGraphs/test/sampling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,10 @@ if GRAPH_T == :coo
nodes = [1, 2]
subgraph = Graphs.induced_subgraph(graph, nodes)

@test subgraph.num_nodes == 3
@test subgraph.num_edges == 2
@test subgraph.ndata.x == graph.ndata.x
@test subgraph.ndata.y == graph.ndata.y
@test subgraph.edata == graph.edata
@test subgraph.num_nodes == 2
@test subgraph.num_edges == 1
@test subgraph.ndata == getobs(g.ndata, [1, 2])
@test subgraph.edata == getobs(graph.edata, 1)

graph = GNNGraph(2)
graph = add_edges(graph, ([2], [1]))
Expand Down

0 comments on commit 9b8301a

Please sign in to comment.