Skip to content

Commit a7df3db

Browse files
committed
fix style
1 parent def1121 commit a7df3db

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

python/cugraph/cugraph/structure/convert_matrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ def from_numpy_array(A, create_using=Graph, vertices=None):
446446
create_using: cugraph.Graph (instance or class), optional (default=Graph)
447447
Specify the type of Graph to create. Can pass in an instance to create
448448
a Graph instance with specified 'directed' attribute.
449-
449+
450450
vertices : cudf.Series or List, optional (default=None)
451451
A cudf.Series or list containing all vertices of the graph. This is
452452
optional, but must be used if the graph contains isolated vertices

python/cugraph/cugraph/structure/graph_classes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ def from_numpy_array(self, np_array, nodes=None, vertices=None):
500500
501501
nodes: array-like or None, optional (default=None)
502502
A list of column names, acting as labels for nodes
503-
503+
504504
vertices : cudf.Series or List, optional (default=None)
505505
A cudf.Series or list containing all vertices of the graph. This is
506506
optional, but must be used if the graph contains isolated vertices

python/cugraph/cugraph/tests/structure/test_graph.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -649,16 +649,20 @@ def test_number_of_edges():
649649

650650
@pytest.mark.sg
651651
def test_vertex_list():
652-
A = np.array([[0., 0., 0., 0., 0., 0., 0., 1., 0., 0.],
653-
[0., 0., 0., 0., 0., 1., 0., 0., 1., 0.],
654-
[0., 0., 0., 0., 0., 0., 0., 1., 0., 0.],
655-
[0., 0., 0., 0., 0., 0., 0., 1., 0., 0.],
656-
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
657-
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
658-
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
659-
[0., 0., 0., 0., 0., 0., 0., 1., 0., 0.],
660-
[0., 0., 0., 0., 0., 0., 0., 1., 0., 0.],
661-
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]])
652+
A = np.array(
653+
[
654+
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0],
655+
[0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0],
656+
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0],
657+
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0],
658+
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
659+
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
660+
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
661+
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0],
662+
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0],
663+
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
664+
]
665+
)
662666

663667
G = nx.from_numpy_array(A)
664668
cG = cugraph.from_numpy_array(nx.to_numpy_array(G))

0 commit comments

Comments
 (0)