Skip to content

Commit

Permalink
Use public cudf APIs where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Mar 6, 2024
1 parent 02241e2 commit 839762e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def bundle_edges(edges, src="src", dst="dst"):
# Determine each edge's index relative to its bundle
edges = edges.sort_values(by="bid").reset_index(drop=True)
edges["_index"] = (
cudf.core.index.RangeIndex(0, len(edges)) - edges["start"]
cudf.RangeIndex(0, len(edges)) - edges["start"]
).astype("int32")

# Re-sort the edgelist by edge id and cleanup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def __init__(self, **params):
def _compute_clims(self):
if not isinstance(
self.source_df[self.aggregate_col].dtype,
cudf.core.dtypes.CategoricalDtype,
cudf.CategoricalDtype,
):
self.clims = get_min_max(self.source_df, self.aggregate_col)

Expand All @@ -238,7 +238,7 @@ def _compute_datashader_assets(self):
self.cmap = {"cmap": self.color_palette}
if isinstance(
self.source_df[self.aggregate_col].dtype,
cudf.core.dtypes.CategoricalDtype,
cudf.CategoricalDtype,
):
self.cmap = {
"color_key": {
Expand Down

0 comments on commit 839762e

Please sign in to comment.