Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/branch-25.02' into cln/cudf/_l…
Browse files Browse the repository at this point in the history
…ib/scalar
  • Loading branch information
mroeschke committed Dec 19, 2024
2 parents 2da93ed + 253b0d8 commit 31ba9b0
Show file tree
Hide file tree
Showing 11 changed files with 678 additions and 325 deletions.
2 changes: 1 addition & 1 deletion python/cudf/cudf/_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# the License.
# =============================================================================

set(cython_sources column.pyx groupby.pyx scalar.pyx strings_udf.pyx types.pyx utils.pyx)
set(cython_sources column.pyx scalar.pyx strings_udf.pyx types.pyx utils.pyx)
set(linked_libraries cudf::cudf)

rapids_cython_create_modules(
Expand Down
5 changes: 1 addition & 4 deletions python/cudf/cudf/_lib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# Copyright (c) 2020-2024, NVIDIA CORPORATION.
import numpy as np

from . import (
groupby,
strings_udf,
)
from . import strings_udf

MAX_COLUMN_SIZE = np.iinfo(np.int32).max
MAX_COLUMN_SIZE_STR = "INT32_MAX"
Expand Down
281 changes: 0 additions & 281 deletions python/cudf/cudf/_lib/groupby.pyx

This file was deleted.

4 changes: 2 additions & 2 deletions python/cudf/cudf/core/_internals/aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@

class Aggregation:
def __init__(self, agg: plc.aggregation.Aggregation) -> None:
self.c_obj = agg
self.plc_obj = agg

@property
def kind(self) -> str:
name = self.c_obj.kind().name
name = self.plc_obj.kind().name
return _agg_name_map.get(name, name)

@classmethod
Expand Down
4 changes: 2 additions & 2 deletions python/cudf/cudf/core/column/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,7 @@ def scan(self, scan_op: str, inclusive: bool, **kwargs) -> Self:
return type(self).from_pylibcudf( # type: ignore[return-value]
plc.reduce.scan(
self.to_pylibcudf(mode="read"),
aggregation.make_aggregation(scan_op, kwargs).c_obj,
aggregation.make_aggregation(scan_op, kwargs).plc_obj,
plc.reduce.ScanType.INCLUSIVE
if inclusive
else plc.reduce.ScanType.EXCLUSIVE,
Expand Down Expand Up @@ -1634,7 +1634,7 @@ def reduce(self, reduction_op: str, dtype=None, **kwargs) -> ScalarLike:
with acquire_spill_lock():
plc_scalar = plc.reduce.reduce(
self.to_pylibcudf(mode="read"),
aggregation.make_aggregation(reduction_op, kwargs).c_obj,
aggregation.make_aggregation(reduction_op, kwargs).plc_obj,
dtype_to_pylibcudf_type(col_dtype),
)
result_col = type(self).from_pylibcudf(
Expand Down
Loading

0 comments on commit 31ba9b0

Please sign in to comment.