Skip to content

Commit

Permalink
Update constscalar usage and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Nov 29, 2023
1 parent d23be59 commit 54a13e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/cudf/cudf/_lib/pylibcudf/copying.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ from cudf._lib.cpp.copying import \
from .column cimport Column
from .table cimport Table

# workaround for https://github.com/cython/cython/issues/3885
# This is a workaround for
# https://github.com/cython/cython/issues/4180
# when creating reference_wrapper[constscalar] in the constructor
ctypedef const scalar constscalar


Expand Down Expand Up @@ -104,7 +106,7 @@ cdef _check_is_list_of_scalars(list source):
# TODO: Could generalize list to sequence
cpdef Table scalar_scatter(list source, Column scatter_map, Table target_table):
cdef unique_ptr[table] c_result
cdef vector[reference_wrapper[constscalar]] source_scalars
cdef vector[reference_wrapper[const scalar]] source_scalars
cdef Scalar slr

_check_is_list_of_scalars(source)
Expand Down Expand Up @@ -236,8 +238,6 @@ cpdef Table scalar_boolean_mask_scatter(list input, Table target, Column boolean
cdef Scalar slr
for slr in input:
c_scalars.push_back(
# TODO: This requires the constscalar ctypedef
# https://github.com/cython/cython/issues/4180
reference_wrapper[constscalar](dereference(slr.c_obj))
)

Expand Down

0 comments on commit 54a13e6

Please sign in to comment.