Skip to content

Commit

Permalink
update doctest examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jnke2016 committed Nov 20, 2023
1 parent 0ceeb4f commit e757ff9
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def analyze_clustering_edge_cut(ResourceHandle resource_handle,
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=True, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=True, renumber=False, do_expensive_check=False)
>>> (vertex, cluster) = pylibcugraph.spectral_modularity_maximization(
... resource_handle, G, num_clusters=5, num_eigen_vects=2, evs_tolerance=0.00001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def analyze_clustering_modularity(ResourceHandle resource_handle,
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=True, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=True, renumber=False, do_expensive_check=False)
>>> (vertex, cluster) = pylibcugraph.spectral_modularity_maximization(
... resource_handle, G, num_clusters=5, num_eigen_vects=2, evs_tolerance=0.00001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def analyze_clustering_ratio_cut(ResourceHandle resource_handle,
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=True, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=True, renumber=False, do_expensive_check=False)
>>> (vertex, cluster) = pylibcugraph.spectral_modularity_maximization(
... resource_handle, G, num_clusters=5, num_eigen_vects=2, evs_tolerance=0.00001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def balanced_cut_clustering(ResourceHandle resource_handle,
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=True, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=True, renumber=False, do_expensive_check=False)
>>> (vertices, clusters) = pylibcugraph.balanced_cut_clustering(
... resource_handle, G, num_clusters=5, num_eigen_vects=2, evs_tolerance=0.00001
Expand Down
2 changes: 1 addition & 1 deletion python/pylibcugraph/pylibcugraph/ecg.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def ecg(ResourceHandle resource_handle,
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=True, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=True, renumber=False, do_expensive_check=False)
>>> (vertices, clusters) = pylibcugraph.ecg(resource_handle, G)
# FIXME: Check this docstring example
Expand Down
2 changes: 1 addition & 1 deletion python/pylibcugraph/pylibcugraph/egonet.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def ego_graph(ResourceHandle resource_handle,
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=False, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=False, renumber=False, do_expensive_check=False)
>>> (sources, destinations, edge_weights, subgraph_offsets) =
... pylibcugraph.ego_graph(resource_handle, G, source_vertices, 2, False)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def eigenvector_centrality(ResourceHandle resource_handle,
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=False, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=True, renumber=False, do_expensive_check=False)
>>> (vertices, values) = pylibcugraph.eigenvector_centrality(
resource_handle, G, 1e-6, 1000, False)
Expand Down
2 changes: 1 addition & 1 deletion python/pylibcugraph/pylibcugraph/graphs.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ cdef class SGGraph(_GPUGraph):
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=False, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=False, renumber=False, do_expensive_check=False)
"""
Expand Down
2 changes: 1 addition & 1 deletion python/pylibcugraph/pylibcugraph/induced_subgraph.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def induced_subgraph(ResourceHandle resource_handle,
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=False, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=False, renumber=False, do_expensive_check=False)
>>> (sources, destinations, edge_weights, subgraph_offsets) =
... pylibcugraph.induced_subgraph(
Expand Down
2 changes: 1 addition & 1 deletion python/pylibcugraph/pylibcugraph/k_truss_subgraph.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def k_truss_subgraph(ResourceHandle resource_handle,
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=True, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=False, renumber=False, do_expensive_check=False)
>>> (sources, destinations, edge_weights, subgraph_offsets) =
... pylibcugraph.k_truss_subgraph(resource_handle, G, k, False)
Expand Down
2 changes: 1 addition & 1 deletion python/pylibcugraph/pylibcugraph/leiden.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def leiden(ResourceHandle resource_handle,
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=True, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=True, renumber=False, do_expensive_check=False)
>>> (vertices, clusters, modularity) = pylibcugraph.Leiden(
resource_handle, G, 100, 1., False)
Expand Down
2 changes: 1 addition & 1 deletion python/pylibcugraph/pylibcugraph/louvain.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def louvain(ResourceHandle resource_handle,
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=True, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=True, renumber=False, do_expensive_check=False)
>>> (vertices, clusters, modularity) = pylibcugraph.louvain(
resource_handle, G, 100, 1e-7, 1., False)
Expand Down
2 changes: 1 addition & 1 deletion python/pylibcugraph/pylibcugraph/node2vec.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def node2vec(ResourceHandle resource_handle,
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=False, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=False, renumber=False, do_expensive_check=False)
>>> (paths, weights, sizes) = pylibcugraph.node2vec(
... resource_handle, G, seeds, 3, True, 1.0, 1.0)
Expand Down
2 changes: 1 addition & 1 deletion python/pylibcugraph/pylibcugraph/personalized_pagerank.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def personalized_pagerank(ResourceHandle resource_handle,
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=False, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=True, renumber=False, do_expensive_check=False)
>>> (vertices, pageranks) = pylibcugraph.personalized_pagerank(
... resource_handle, G, None, None, None, None, alpha=0.85,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def spectral_modularity_maximization(ResourceHandle resource_handle,
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=True, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=True, renumber=False, do_expensive_check=False)
>>> (vertices, clusters) = pylibcugraph.spectral_modularity_maximization(
... resource_handle, G, num_clusters=5, num_eigen_vects=2, evs_tolerance=0.00001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def weakly_connected_components(ResourceHandle resource_handle,
>>> graph_props = pylibcugraph.GraphProperties(
... is_symmetric=True, is_multigraph=False)
>>> G = pylibcugraph.SGGraph(
... resource_handle, graph_props, srcs, dsts, weights,
... resource_handle, graph_props, srcs, dsts, weight_array=weights,
... store_transposed=False, renumber=True, do_expensive_check=False)
>>> (vertices, labels) = weakly_connected_components(
... resource_handle, G, None, None, None, None, False)
Expand Down

0 comments on commit e757ff9

Please sign in to comment.