-
Notifications
You must be signed in to change notification settings - Fork 912
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap new rolling window utility function in pylibcudf
- Loading branch information
Showing
5 changed files
with
67 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,31 @@ | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
from libc.stdint cimport int32_t | ||
from libcpp cimport bool | ||
|
||
from cudf._lib.pylibcudf.libcudf.rolling cimport window_type | ||
from cudf._lib.pylibcudf.libcudf.types cimport size_type | ||
|
||
from .aggregation cimport Aggregation | ||
from .column cimport Column | ||
from .scalar cimport Scalar | ||
|
||
ctypedef fused WindowType: | ||
ctypedef fused WindowArg: | ||
Column | ||
size_type | ||
|
||
|
||
cpdef Column rolling_window( | ||
Column source, | ||
WindowType preceding_window, | ||
WindowType following_window, | ||
WindowArg preceding_window, | ||
WindowArg following_window, | ||
size_type min_periods, | ||
Aggregation agg, | ||
) | ||
|
||
cpdef tuple[Column, Column] windows_from_offset( | ||
Column input, | ||
Scalar length, | ||
Scalar offset, | ||
window_type window_type, | ||
bool only_preceding, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters