Skip to content

Commit

Permalink
Add an Explanatory Error Message for uint Types (#4556)
Browse files Browse the repository at this point in the history
Clarify that unsigned integer types are not supported as vertex ids in the error message.  Resolves issue reported by @ogreen.

Authors:
  - Alex Barghi (https://github.com/alexbarghi-nv)

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

URL: #4556
  • Loading branch information
alexbarghi-nv authored Aug 13, 2024
1 parent a5cdea2 commit 1ef3f56
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,13 @@ def __from_edgelist(
elif elist[source].dtype not in [np.int32, np.int64] or elist[
destination
].dtype not in [np.int32, np.int64]:
if elist[destination].dtype in [np.uint32, np.uint64] or elist[
source
].dtype in [np.uint32, np.uint64]:
raise ValueError(
"Unsigned integers are not supported as vertex ids."
" Either convert to signed integers or set renumber=True"
)
raise ValueError("set renumber to True for non integer columns ids")

# The dataframe will be symmetrized iff the graph is undirected
Expand Down

0 comments on commit 1ef3f56

Please sign in to comment.