Skip to content

Commit

Permalink
Fix MG katz_centrality: Check if DataFrame Arg is Not None (#4555)
Browse files Browse the repository at this point in the history
[This](rapidsai/cudf#16311) PR recently introduced some API changes that broke `test_katz_centrality_mg.py` because it was using an improper method of trying to evaluate a `cudf.DataFrame` to a truth value.


This PR adds a fix to check if the `nstart` argument is set to `None`.

Authors:
  - Ralph Liu (https://github.com/nv-rliu)

Approvers:
  - Rick Ratzel (https://github.com/rlratzel)

URL: #4555
  • Loading branch information
nv-rliu authored Jul 30, 2024
1 parent 4ff7acb commit 94e60f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/cugraph/cugraph/dask/centrality/katz_centrality.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def katz_centrality(
do_expensive_check = False

initial_hubs_guess_values = None
if nstart:
if nstart is not None:
if input_graph.renumbered:
if len(input_graph.renumber_map.implementation.col_names) > 1:
cols = nstart.columns[:-1].to_list()
Expand Down

0 comments on commit 94e60f0

Please sign in to comment.