Skip to content

Commit

Permalink
add explanatory error message for uint types
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbarghi-nv committed Jul 26, 2024
1 parent c9d2843 commit c7a9cf4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ 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]:
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 c7a9cf4

Please sign in to comment.