Skip to content

[DOC]: weakly_connected_components says that input graph can be directed but the code suggests otherwise #3133

@acjones27

Description

@acjones27

How would you describe the priority of this documentation request

High

Please provide a link or source to the relevant docs

https://docs.rapids.ai/api/cugraph/stable/api_docs/api/cugraph.weakly_connected_components.html

Describe the problems in the documentation

The documentation for weakly_connected_components suggests that

If using a graph object, the graph can be either directed or undirected where an undirected edge is represented by a directed edge in both directions

I am passing in a graph of type <cugraph.structure.graph_classes.Graph object> and G.is_directed() is True, but I still get the error

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/conda/envs/rapids-22.12-new/lib/python3.9/site-packages/cugraph/components/connectivity.py", line 188, in weakly_connected_components
    raise ValueError("input graph must be undirected")
ValueError: input graph must be undirected

And the code also quite clearly checks this

In this case, I guess the documentation is incorrect unless I'm missing something?

(Optional) Propose a correction

No response

Code of Conduct

  • I agree to follow cuGraph's Code of Conduct
  • I have searched the open documentation issues and have found no duplicates for this bug report

Metadata

Metadata

Assignees

Labels

docDocumentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions