From 867dbd2630eaa71a2bf4238b281fc8deedc1377d Mon Sep 17 00:00:00 2001 From: Zhong Hui Date: Thu, 2 Jul 2020 10:19:57 +0800 Subject: [PATCH] fix typo --- pgl/tests/test_graph_saint_sample.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pgl/tests/test_graph_saint_sample.py b/pgl/tests/test_graph_saint_sample.py index bdfd6df..6eceeb2 100644 --- a/pgl/tests/test_graph_saint_sample.py +++ b/pgl/tests/test_graph_saint_sample.py @@ -11,12 +11,16 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""graph saint sample test""" - +"""graph saint sample test +""" +from __future__ import division +from __future__ import absolute_import +from __future__ import print_function +from __future__ import unicode_literals import unittest +import numpy as np import pgl -import numpy as np import paddle.fluid as fluid from pgl.sample import graph_saint_random_walk_sample @@ -25,14 +29,14 @@ class GraphSaintSampleTest(unittest.TestCase): """GraphSaintSampleTest""" def test_randomwalk_sampler(self): - """test_scatter_add""" + """test_randomwalk_sampler""" g = pgl.graph.Graph( num_nodes=8, edges=[(1, 2), (2, 3), (0, 2), (0, 1), (6, 7), (4, 5), (6, 4), (7, 4), (3, 4)]) subgraph = graph_saint_random_walk_sample(g, [6, 7], 2) - print('reinded', subgraph._from_reindex) - print('sub_edges', subgraph.edges) + print('reindex', subgraph._from_reindex) + print('subedges', subgraph.edges) assert len(subgraph.nodes) == 4 assert len(subgraph.edges) == 4 true_edges = np.array([[0, 1], [2, 3], [2, 0], [3, 0]]) -- GitLab