diff --git a/python/cudf/cudf/_lib/CMakeLists.txt b/python/cudf/cudf/_lib/CMakeLists.txt index 07f334fdc12..5a067e84f56 100644 --- a/python/cudf/cudf/_lib/CMakeLists.txt +++ b/python/cudf/cudf/_lib/CMakeLists.txt @@ -68,7 +68,6 @@ target_link_libraries(strings_udf PUBLIC cudf_strings_udf) set(targets_using_arrow_headers interop avro csv orc json parquet) link_to_pyarrow_headers("${targets_using_arrow_headers}") -add_subdirectory(cpp) add_subdirectory(io) add_subdirectory(nvtext) add_subdirectory(pylibcudf) diff --git a/python/cudf/cudf/_lib/avro.pyx b/python/cudf/cudf/_lib/avro.pyx index 0e24b5b7459..ae17a5f1ab6 100644 --- a/python/cudf/cudf/_lib/avro.pyx +++ b/python/cudf/cudf/_lib/avro.pyx @@ -1,16 +1,16 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.string cimport string from libcpp.utility cimport move from libcpp.vector cimport vector -from cudf._lib.cpp.io.avro cimport ( +from cudf._lib.io.utils cimport make_source_info +from cudf._lib.pylibcudf.libcudf.io.avro cimport ( avro_reader_options, read_avro as libcudf_read_avro, ) -from cudf._lib.cpp.io.types cimport table_with_metadata -from cudf._lib.cpp.types cimport size_type -from cudf._lib.io.utils cimport make_source_info +from cudf._lib.pylibcudf.libcudf.io.types cimport table_with_metadata +from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.utils cimport data_from_unique_ptr diff --git a/python/cudf/cudf/_lib/column.pxd b/python/cudf/cudf/_lib/column.pxd index 7ffb55a6cc6..437f44af9f0 100644 --- a/python/cudf/cudf/_lib/column.pxd +++ b/python/cudf/cudf/_lib/column.pxd @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from typing import Literal @@ -7,9 +7,12 @@ from libcpp.memory cimport unique_ptr from rmm._lib.device_buffer cimport device_buffer -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view, mutable_column_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( + column_view, + mutable_column_view, +) +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef class Column: diff --git a/python/cudf/cudf/_lib/column.pyx b/python/cudf/cudf/_lib/column.pyx index 9c48a731cea..f33e121241d 100644 --- a/python/cudf/cudf/_lib/column.pyx +++ b/python/cudf/cudf/_lib/column.pyx @@ -43,18 +43,18 @@ from cudf._lib.types import dtype_from_pylibcudf_column # from_pylibcudf by instead creating an empty numeric column. We will be able # to remove this once column factories are exposed to pylibcudf. -cimport cudf._lib.cpp.copying as cpp_copying -cimport cudf._lib.cpp.types as libcudf_types -cimport cudf._lib.cpp.unary as libcudf_unary -from cudf._lib cimport pylibcudf -from cudf._lib.cpp.column.column cimport column, column_contents -from cudf._lib.cpp.column.column_factories cimport ( +cimport cudf._lib.pylibcudf.libcudf.copying as cpp_copying +cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types +cimport cudf._lib.pylibcudf.libcudf.unary as libcudf_unary +from cudf._lib.pylibcudf cimport Column as plc_Column +from cudf._lib.pylibcudf.libcudf.column.column cimport column, column_contents +from cudf._lib.pylibcudf.libcudf.column.column_factories cimport ( make_column_from_scalar as cpp_make_column_from_scalar, make_numeric_column, ) -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.null_mask cimport null_count as cpp_null_count -from cudf._lib.cpp.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.null_mask cimport null_count as cpp_null_count +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar from cudf._lib.scalar cimport DeviceScalar @@ -633,7 +633,7 @@ cdef class Column: # TODO: This function call is what requires cimporting pylibcudf. # We can remove the cimport once we can directly do # pylibcudf.column_factories.make_numeric_column or equivalent. - col = pylibcudf.Column.from_libcudf( + col = plc_Column.from_libcudf( move( make_numeric_column( new_dtype, col.size(), libcudf_types.mask_state.ALL_NULL diff --git a/python/cudf/cudf/_lib/copying.pxd b/python/cudf/cudf/_lib/copying.pxd index 599b9c5a067..8fc7f4e1da0 100644 --- a/python/cudf/cudf/_lib/copying.pxd +++ b/python/cudf/cudf/_lib/copying.pxd @@ -1,6 +1,6 @@ -# Copyright (c) 2021-2023, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. -from cudf._lib.cpp.contiguous_split cimport packed_columns +from cudf._lib.pylibcudf.libcudf.contiguous_split cimport packed_columns cdef class _CPackedColumns: diff --git a/python/cudf/cudf/_lib/copying.pyx b/python/cudf/cudf/_lib/copying.pyx index 6a52af520f0..796c70e615c 100644 --- a/python/cudf/cudf/_lib/copying.pyx +++ b/python/cudf/cudf/_lib/copying.pyx @@ -26,15 +26,17 @@ from cudf.core.abc import Serializable from libcpp.memory cimport make_unique -cimport cudf._lib.cpp.contiguous_split as cpp_contiguous_split -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.lists.gather cimport ( +cimport cudf._lib.pylibcudf.libcudf.contiguous_split as cpp_contiguous_split +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.lists.gather cimport ( segmented_gather as cpp_segmented_gather, ) -from cudf._lib.cpp.lists.lists_column_view cimport lists_column_view -from cudf._lib.cpp.scalar.scalar cimport scalar -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( + lists_column_view, +) +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.utils cimport columns_from_pylibcudf_table, data_from_table_view # workaround for https://github.com/cython/cython/issues/3885 diff --git a/python/cudf/cudf/_lib/cpp/lists/count_elements.pxd b/python/cudf/cudf/_lib/cpp/lists/count_elements.pxd deleted file mode 100644 index 9be38f26237..00000000000 --- a/python/cudf/cudf/_lib/cpp/lists/count_elements.pxd +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2021, NVIDIA CORPORATION. - -from libcpp.memory cimport unique_ptr - -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.lists.lists_column_view cimport lists_column_view - - -cdef extern from "cudf/lists/count_elements.hpp" namespace "cudf::lists" nogil: - cdef unique_ptr[column] count_elements(const lists_column_view) except + diff --git a/python/cudf/cudf/_lib/cpp/lists/explode.pxd b/python/cudf/cudf/_lib/cpp/lists/explode.pxd deleted file mode 100644 index c3e15dd203c..00000000000 --- a/python/cudf/cudf/_lib/cpp/lists/explode.pxd +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2021, NVIDIA CORPORATION. - -from libcpp.memory cimport unique_ptr - -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport size_type - - -cdef extern from "cudf/lists/explode.hpp" namespace "cudf" nogil: - cdef unique_ptr[table] explode_outer( - const table_view, - size_type explode_column_idx, - ) except + diff --git a/python/cudf/cudf/_lib/cpp/strings/extract.pxd b/python/cudf/cudf/_lib/cpp/strings/extract.pxd deleted file mode 100644 index 384f0f0ef42..00000000000 --- a/python/cudf/cudf/_lib/cpp/strings/extract.pxd +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. - -from libcpp.memory cimport unique_ptr - -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.strings.regex_program cimport regex_program -from cudf._lib.cpp.table.table cimport table - - -cdef extern from "cudf/strings/extract.hpp" namespace "cudf::strings" nogil: - - cdef unique_ptr[table] extract( - column_view source_strings, - regex_program) except + diff --git a/python/cudf/cudf/_lib/cpp/strings/findall.pxd b/python/cudf/cudf/_lib/cpp/strings/findall.pxd deleted file mode 100644 index 8c878ada097..00000000000 --- a/python/cudf/cudf/_lib/cpp/strings/findall.pxd +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2019-2022, NVIDIA CORPORATION. - -from libcpp.memory cimport unique_ptr - -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.strings.regex_program cimport regex_program - - -cdef extern from "cudf/strings/findall.hpp" namespace "cudf::strings" nogil: - - cdef unique_ptr[column] findall( - column_view source_strings, - regex_program) except + diff --git a/python/cudf/cudf/_lib/cpp/strings/strip.pxd b/python/cudf/cudf/_lib/cpp/strings/strip.pxd deleted file mode 100644 index 3a86f80328f..00000000000 --- a/python/cudf/cudf/_lib/cpp/strings/strip.pxd +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. - -from libcpp.memory cimport unique_ptr - -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.side_type cimport side_type - - -cdef extern from "cudf/strings/strip.hpp" namespace "cudf::strings" nogil: - - cdef unique_ptr[column] strip( - column_view source_strings, - side_type stype, - string_scalar to_strip) except + diff --git a/python/cudf/cudf/_lib/cpp/strings/wrap.pxd b/python/cudf/cudf/_lib/cpp/strings/wrap.pxd deleted file mode 100644 index 62c791799ad..00000000000 --- a/python/cudf/cudf/_lib/cpp/strings/wrap.pxd +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. - -from libcpp.memory cimport unique_ptr - -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.types cimport size_type - - -cdef extern from "cudf/strings/wrap.hpp" namespace "cudf::strings" nogil: - - cdef unique_ptr[column] wrap( - column_view source_strings, - size_type width) except + diff --git a/python/cudf/cudf/_lib/csv.pyx b/python/cudf/cudf/_lib/csv.pyx index b2e4d442bd2..aa771295607 100644 --- a/python/cudf/cudf/_lib/csv.pyx +++ b/python/cudf/cudf/_lib/csv.pyx @@ -7,9 +7,9 @@ from libcpp.string cimport string from libcpp.utility cimport move from libcpp.vector cimport vector -cimport cudf._lib.cpp.types as libcudf_types -from cudf._lib.cpp.types cimport data_type +cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types from cudf._lib.io.datasource cimport Datasource, NativeFileDatasource +from cudf._lib.pylibcudf.libcudf.types cimport data_type from cudf._lib.types cimport dtype_to_data_type import numpy as np @@ -18,7 +18,7 @@ import pandas as pd import cudf from cudf.core.buffer import acquire_spill_lock -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.types cimport size_type import errno import os @@ -29,22 +29,22 @@ from io import BytesIO, StringIO from libc.stdint cimport int32_t from libcpp cimport bool -from cudf._lib.cpp.io.csv cimport ( +from cudf._lib.io.utils cimport make_sink_info, make_source_info +from cudf._lib.pylibcudf.libcudf.io.csv cimport ( csv_reader_options, csv_writer_options, read_csv as cpp_read_csv, write_csv as cpp_write_csv, ) -from cudf._lib.cpp.io.data_sink cimport data_sink -from cudf._lib.cpp.io.types cimport ( +from cudf._lib.pylibcudf.libcudf.io.data_sink cimport data_sink +from cudf._lib.pylibcudf.libcudf.io.types cimport ( compression_type, quote_style, sink_info, source_info, table_with_metadata, ) -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.io.utils cimport make_sink_info, make_source_info +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view from cudf._lib.utils cimport data_from_unique_ptr, table_view_from_table from pyarrow.lib import NativeFile diff --git a/python/cudf/cudf/_lib/datetime.pyx b/python/cudf/cudf/_lib/datetime.pyx index 009a69ea501..b30ef875a7b 100644 --- a/python/cudf/cudf/_lib/datetime.pyx +++ b/python/cudf/cudf/_lib/datetime.pyx @@ -7,13 +7,13 @@ from cudf.core.buffer import acquire_spill_lock from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -cimport cudf._lib.cpp.datetime as libcudf_datetime +cimport cudf._lib.pylibcudf.libcudf.datetime as libcudf_datetime from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.filling cimport calendrical_month_sequence -from cudf._lib.cpp.scalar.scalar cimport scalar -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.filling cimport calendrical_month_sequence +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/expressions.pxd b/python/cudf/cudf/_lib/expressions.pxd index c2ee504c626..4a20c5fc545 100644 --- a/python/cudf/cudf/_lib/expressions.pxd +++ b/python/cudf/cudf/_lib/expressions.pxd @@ -3,13 +3,13 @@ from libc.stdint cimport int32_t, int64_t from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.expressions cimport ( +from cudf._lib.pylibcudf.libcudf.expressions cimport ( column_reference, expression, literal, operation, ) -from cudf._lib.cpp.scalar.scalar cimport ( +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport ( numeric_scalar, scalar, string_scalar, diff --git a/python/cudf/cudf/_lib/expressions.pyx b/python/cudf/cudf/_lib/expressions.pyx index a3b07075507..3fb29279ed7 100644 --- a/python/cudf/cudf/_lib/expressions.pyx +++ b/python/cudf/cudf/_lib/expressions.pyx @@ -10,9 +10,12 @@ from libcpp.memory cimport make_unique, unique_ptr from libcpp.string cimport string from libcpp.utility cimport move -from cudf._lib.cpp cimport expressions as libcudf_exp -from cudf._lib.cpp.types cimport size_type -from cudf._lib.cpp.wrappers.timestamps cimport timestamp_ms, timestamp_us +from cudf._lib.pylibcudf.libcudf cimport expressions as libcudf_exp +from cudf._lib.pylibcudf.libcudf.types cimport size_type +from cudf._lib.pylibcudf.libcudf.wrappers.timestamps cimport ( + timestamp_ms, + timestamp_us, +) # Necessary for proper casting, see below. ctypedef int32_t underlying_type_ast_operator diff --git a/python/cudf/cudf/_lib/groupby.pyx b/python/cudf/cudf/_lib/groupby.pyx index d5e97439180..7533ed56647 100644 --- a/python/cudf/cudf/_lib/groupby.pyx +++ b/python/cudf/cudf/_lib/groupby.pyx @@ -18,8 +18,8 @@ from cudf._lib.utils cimport columns_from_pylibcudf_table from cudf._lib.scalar import as_device_scalar -from cudf._lib.cpp.replace cimport replace_policy -from cudf._lib.cpp.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.replace cimport replace_policy +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar from cudf._lib import pylibcudf from cudf._lib.aggregation import make_aggregation diff --git a/python/cudf/cudf/_lib/hash.pyx b/python/cudf/cudf/_lib/hash.pyx index 6854cff7763..b8331d5a226 100644 --- a/python/cudf/cudf/_lib/hash.pyx +++ b/python/cudf/cudf/_lib/hash.pyx @@ -7,10 +7,10 @@ from libcpp.pair cimport pair from libcpp.utility cimport move from libcpp.vector cimport vector -cimport cudf._lib.cpp.types as libcudf_types +cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.hash cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.hash cimport ( md5, murmurhash3_x86_32, sha1, @@ -20,9 +20,11 @@ from cudf._lib.cpp.hash cimport ( sha512, xxhash_64, ) -from cudf._lib.cpp.partitioning cimport hash_partition as cpp_hash_partition -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.partitioning cimport ( + hash_partition as cpp_hash_partition, +) +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view from cudf._lib.utils cimport columns_from_unique_ptr, table_view_from_columns diff --git a/python/cudf/cudf/_lib/interop.pyx b/python/cudf/cudf/_lib/interop.pyx index 0afed1bbd2e..37595b65e65 100644 --- a/python/cudf/cudf/_lib/interop.pyx +++ b/python/cudf/cudf/_lib/interop.pyx @@ -6,13 +6,13 @@ from libcpp.utility cimport move from cudf._lib import pylibcudf -from cudf._lib.cpp.interop cimport ( +from cudf._lib.pylibcudf.libcudf.interop cimport ( DLManagedTensor, from_dlpack as cpp_from_dlpack, to_dlpack as cpp_to_dlpack, ) -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view from cudf._lib.utils cimport ( columns_from_pylibcudf_table, columns_from_unique_ptr, diff --git a/python/cudf/cudf/_lib/io/datasource.pxd b/python/cudf/cudf/_lib/io/datasource.pxd index bd5bf0227a5..a0a9c3fa0d4 100644 --- a/python/cudf/cudf/_lib/io/datasource.pxd +++ b/python/cudf/cudf/_lib/io/datasource.pxd @@ -1,9 +1,9 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport shared_ptr -from cudf._lib.cpp.io.arrow_io_source cimport arrow_io_source -from cudf._lib.cpp.io.datasource cimport datasource +from cudf._lib.pylibcudf.libcudf.io.arrow_io_source cimport arrow_io_source +from cudf._lib.pylibcudf.libcudf.io.datasource cimport datasource cdef class Datasource: diff --git a/python/cudf/cudf/_lib/io/datasource.pyx b/python/cudf/cudf/_lib/io/datasource.pyx index 5cadd58d8d3..aa7fa0efdaf 100644 --- a/python/cudf/cudf/_lib/io/datasource.pyx +++ b/python/cudf/cudf/_lib/io/datasource.pyx @@ -1,11 +1,11 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport shared_ptr from pyarrow.includes.libarrow cimport CRandomAccessFile from pyarrow.lib cimport NativeFile -from cudf._lib.cpp.io.arrow_io_source cimport arrow_io_source -from cudf._lib.cpp.io.datasource cimport datasource +from cudf._lib.pylibcudf.libcudf.io.arrow_io_source cimport arrow_io_source +from cudf._lib.pylibcudf.libcudf.io.datasource cimport datasource cdef class Datasource: diff --git a/python/cudf/cudf/_lib/io/utils.pxd b/python/cudf/cudf/_lib/io/utils.pxd index 2c2d52b512b..252d986843a 100644 --- a/python/cudf/cudf/_lib/io/utils.pxd +++ b/python/cudf/cudf/_lib/io/utils.pxd @@ -1,11 +1,15 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector from cudf._lib.column cimport Column -from cudf._lib.cpp.io.data_sink cimport data_sink -from cudf._lib.cpp.io.types cimport column_name_info, sink_info, source_info +from cudf._lib.pylibcudf.libcudf.io.data_sink cimport data_sink +from cudf._lib.pylibcudf.libcudf.io.types cimport ( + column_name_info, + sink_info, + source_info, +) cdef source_info make_source_info(list src) except* diff --git a/python/cudf/cudf/_lib/io/utils.pyx b/python/cudf/cudf/_lib/io/utils.pyx index ae978d18813..3c14ec46122 100644 --- a/python/cudf/cudf/_lib/io/utils.pyx +++ b/python/cudf/cudf/_lib/io/utils.pyx @@ -8,15 +8,15 @@ from libcpp.utility cimport move from libcpp.vector cimport vector from cudf._lib.column cimport Column -from cudf._lib.cpp.io.data_sink cimport data_sink -from cudf._lib.cpp.io.datasource cimport datasource -from cudf._lib.cpp.io.types cimport ( +from cudf._lib.io.datasource cimport Datasource +from cudf._lib.pylibcudf.libcudf.io.data_sink cimport data_sink +from cudf._lib.pylibcudf.libcudf.io.datasource cimport datasource +from cudf._lib.pylibcudf.libcudf.io.types cimport ( column_name_info, host_buffer, sink_info, source_info, ) -from cudf._lib.io.datasource cimport Datasource import codecs import errno diff --git a/python/cudf/cudf/_lib/json.pyx b/python/cudf/cudf/_lib/json.pyx index cef71ed24a5..283a451dd4a 100644 --- a/python/cudf/cudf/_lib/json.pyx +++ b/python/cudf/cudf/_lib/json.pyx @@ -14,30 +14,30 @@ from libcpp.string cimport string from libcpp.utility cimport move from libcpp.vector cimport vector -cimport cudf._lib.cpp.io.types as cudf_io_types +cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types from cudf._lib.column cimport Column -from cudf._lib.cpp.io.data_sink cimport data_sink -from cudf._lib.cpp.io.json cimport ( +from cudf._lib.io.utils cimport ( + make_sink_info, + make_source_info, + update_struct_field_names, +) +from cudf._lib.pylibcudf.libcudf.io.data_sink cimport data_sink +from cudf._lib.pylibcudf.libcudf.io.json cimport ( json_reader_options, json_writer_options, read_json as libcudf_read_json, schema_element, write_json as libcudf_write_json, ) -from cudf._lib.cpp.io.types cimport ( +from cudf._lib.pylibcudf.libcudf.io.types cimport ( column_name_info, compression_type, sink_info, table_metadata, table_with_metadata, ) -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport data_type, size_type -from cudf._lib.io.utils cimport ( - make_sink_info, - make_source_info, - update_struct_field_names, -) +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type from cudf._lib.types cimport dtype_to_data_type from cudf._lib.utils cimport data_from_unique_ptr, table_view_from_table diff --git a/python/cudf/cudf/_lib/labeling.pyx b/python/cudf/cudf/_lib/labeling.pyx index 2c2538ab0af..439a727a9ca 100644 --- a/python/cudf/cudf/_lib/labeling.pyx +++ b/python/cudf/cudf/_lib/labeling.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -7,9 +7,12 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.labeling cimport inclusive, label_bins as cpp_label_bins +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.labeling cimport ( + inclusive, + label_bins as cpp_label_bins, +) # Note that the parameter input shadows a Python built-in in the local scope, diff --git a/python/cudf/cudf/_lib/lists.pyx b/python/cudf/cudf/_lib/lists.pyx index f4d16967300..656d92c1a4b 100644 --- a/python/cudf/cudf/_lib/lists.pyx +++ b/python/cudf/cudf/_lib/lists.pyx @@ -7,24 +7,33 @@ from libcpp.memory cimport make_shared, shared_ptr, unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.lists.combine cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.lists.combine cimport ( concatenate_list_elements as cpp_concatenate_list_elements, concatenate_null_policy, concatenate_rows as cpp_concatenate_rows, ) -from cudf._lib.cpp.lists.contains cimport contains, index_of as cpp_index_of -from cudf._lib.cpp.lists.count_elements cimport ( +from cudf._lib.pylibcudf.libcudf.lists.contains cimport ( + contains, + index_of as cpp_index_of, +) +from cudf._lib.pylibcudf.libcudf.lists.count_elements cimport ( count_elements as cpp_count_elements, ) -from cudf._lib.cpp.lists.extract cimport extract_list_element -from cudf._lib.cpp.lists.lists_column_view cimport lists_column_view -from cudf._lib.cpp.lists.sorting cimport sort_lists as cpp_sort_lists -from cudf._lib.cpp.lists.stream_compaction cimport distinct as cpp_distinct -from cudf._lib.cpp.scalar.scalar cimport scalar -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport ( +from cudf._lib.pylibcudf.libcudf.lists.extract cimport extract_list_element +from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( + lists_column_view, +) +from cudf._lib.pylibcudf.libcudf.lists.sorting cimport ( + sort_lists as cpp_sort_lists, +) +from cudf._lib.pylibcudf.libcudf.lists.stream_compaction cimport ( + distinct as cpp_distinct, +) +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport ( nan_equality, null_equality, null_order, diff --git a/python/cudf/cudf/_lib/null_mask.pyx b/python/cudf/cudf/_lib/null_mask.pyx index 1f98140d9e4..b00deae2270 100644 --- a/python/cudf/cudf/_lib/null_mask.pyx +++ b/python/cudf/cudf/_lib/null_mask.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from enum import Enum @@ -11,8 +11,8 @@ from libcpp.pair cimport pair from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.null_mask cimport ( +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.null_mask cimport ( bitmask_allocation_size_bytes as cpp_bitmask_allocation_size_bytes, bitmask_and as cpp_bitmask_and, bitmask_or as cpp_bitmask_or, @@ -20,8 +20,8 @@ from cudf._lib.cpp.null_mask cimport ( create_null_mask as cpp_create_null_mask, underlying_type_t_mask_state, ) -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport mask_state, size_type +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport mask_state, size_type from cudf._lib.utils cimport table_view_from_columns diff --git a/python/cudf/cudf/_lib/nvtext/byte_pair_encode.pyx b/python/cudf/cudf/_lib/nvtext/byte_pair_encode.pyx index cfc76afa8a5..d60162d0656 100644 --- a/python/cudf/cudf/_lib/nvtext/byte_pair_encode.pyx +++ b/python/cudf/cudf/_lib/nvtext/byte_pair_encode.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -7,14 +7,14 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.nvtext.byte_pair_encode cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.nvtext.byte_pair_encode cimport ( bpe_merge_pairs as cpp_bpe_merge_pairs, byte_pair_encoding as cpp_byte_pair_encoding, load_merge_pairs as cpp_load_merge_pairs, ) -from cudf._lib.cpp.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/nvtext/edit_distance.pyx b/python/cudf/cudf/_lib/nvtext/edit_distance.pyx index 984c8e84d7c..514b6610575 100644 --- a/python/cudf/cudf/_lib/nvtext/edit_distance.pyx +++ b/python/cudf/cudf/_lib/nvtext/edit_distance.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -6,9 +6,9 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.nvtext.edit_distance cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.nvtext.edit_distance cimport ( edit_distance as cpp_edit_distance, edit_distance_matrix as cpp_edit_distance_matrix, ) diff --git a/python/cudf/cudf/_lib/nvtext/generate_ngrams.pyx b/python/cudf/cudf/_lib/nvtext/generate_ngrams.pyx index 96b95c8792d..a6b9a1e4f7a 100644 --- a/python/cudf/cudf/_lib/nvtext/generate_ngrams.pyx +++ b/python/cudf/cudf/_lib/nvtext/generate_ngrams.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2023, NVIDIA CORPORATION. +# Copyright (c) 2018-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -6,15 +6,15 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.nvtext.generate_ngrams cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.nvtext.generate_ngrams cimport ( generate_character_ngrams as cpp_generate_character_ngrams, generate_ngrams as cpp_generate_ngrams, hash_character_ngrams as cpp_hash_character_ngrams, ) -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/nvtext/jaccard.pyx b/python/cudf/cudf/_lib/nvtext/jaccard.pyx index 9035e743fa5..42fe15d6869 100644 --- a/python/cudf/cudf/_lib/nvtext/jaccard.pyx +++ b/python/cudf/cudf/_lib/nvtext/jaccard.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -6,10 +6,12 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.nvtext.jaccard cimport jaccard_index as cpp_jaccard_index -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.nvtext.jaccard cimport ( + jaccard_index as cpp_jaccard_index, +) +from cudf._lib.pylibcudf.libcudf.types cimport size_type @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/nvtext/minhash.pyx b/python/cudf/cudf/_lib/nvtext/minhash.pyx index 6ed5ca834ee..4c92999e190 100644 --- a/python/cudf/cudf/_lib/nvtext/minhash.pyx +++ b/python/cudf/cudf/_lib/nvtext/minhash.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -6,13 +6,13 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.nvtext.minhash cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.nvtext.minhash cimport ( minhash as cpp_minhash, minhash64 as cpp_minhash64, ) -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.types cimport size_type @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/nvtext/ngrams_tokenize.pyx b/python/cudf/cudf/_lib/nvtext/ngrams_tokenize.pyx index 3e7911c8ae8..ccd8de8c96f 100644 --- a/python/cudf/cudf/_lib/nvtext/ngrams_tokenize.pyx +++ b/python/cudf/cudf/_lib/nvtext/ngrams_tokenize.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -6,13 +6,13 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.nvtext.ngrams_tokenize cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.nvtext.ngrams_tokenize cimport ( ngrams_tokenize as cpp_ngrams_tokenize, ) -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/nvtext/normalize.pyx b/python/cudf/cudf/_lib/nvtext/normalize.pyx index 80c6ef792ab..9f81f865bb7 100644 --- a/python/cudf/cudf/_lib/nvtext/normalize.pyx +++ b/python/cudf/cudf/_lib/nvtext/normalize.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -7,9 +7,9 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.nvtext.normalize cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.nvtext.normalize cimport ( normalize_characters as cpp_normalize_characters, normalize_spaces as cpp_normalize_spaces, ) diff --git a/python/cudf/cudf/_lib/nvtext/replace.pyx b/python/cudf/cudf/_lib/nvtext/replace.pyx index 289e5611010..ce2edc58d19 100644 --- a/python/cudf/cudf/_lib/nvtext/replace.pyx +++ b/python/cudf/cudf/_lib/nvtext/replace.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -6,14 +6,14 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.nvtext.replace cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.nvtext.replace cimport ( filter_tokens as cpp_filter_tokens, replace_tokens as cpp_replace_tokens, ) -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/nvtext/stemmer.pyx b/python/cudf/cudf/_lib/nvtext/stemmer.pyx index c690aba70de..8f75953ae99 100644 --- a/python/cudf/cudf/_lib/nvtext/stemmer.pyx +++ b/python/cudf/cudf/_lib/nvtext/stemmer.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -8,15 +8,15 @@ from libcpp.utility cimport move from enum import IntEnum from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.nvtext.stemmer cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.nvtext.stemmer cimport ( is_letter as cpp_is_letter, letter_type, porter_stemmer_measure as cpp_porter_stemmer_measure, underlying_type_t_letter_type, ) -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.types cimport size_type class LetterType(IntEnum): diff --git a/python/cudf/cudf/_lib/nvtext/subword_tokenize.pyx b/python/cudf/cudf/_lib/nvtext/subword_tokenize.pyx index bf675a16adc..1112667a087 100644 --- a/python/cudf/cudf/_lib/nvtext/subword_tokenize.pyx +++ b/python/cudf/cudf/_lib/nvtext/subword_tokenize.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libc.stdint cimport uint32_t @@ -10,8 +10,8 @@ from libcpp.string cimport string from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.nvtext.subword_tokenize cimport ( +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.nvtext.subword_tokenize cimport ( hashed_vocabulary as cpp_hashed_vocabulary, load_vocabulary_file as cpp_load_vocabulary_file, move as tr_move, diff --git a/python/cudf/cudf/_lib/nvtext/tokenize.pyx b/python/cudf/cudf/_lib/nvtext/tokenize.pyx index bee9d6f6c4d..98afd94ab1c 100644 --- a/python/cudf/cudf/_lib/nvtext/tokenize.pyx +++ b/python/cudf/cudf/_lib/nvtext/tokenize.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2023, NVIDIA CORPORATION. +# Copyright (c) 2018-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -6,9 +6,9 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.nvtext.tokenize cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.nvtext.tokenize cimport ( character_tokenize as cpp_character_tokenize, count_tokens as cpp_count_tokens, detokenize as cpp_detokenize, @@ -17,8 +17,8 @@ from cudf._lib.cpp.nvtext.tokenize cimport ( tokenize_vocabulary as cpp_tokenize_vocabulary, tokenize_with_vocabulary as cpp_tokenize_with_vocabulary, ) -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/orc.pyx b/python/cudf/cudf/_lib/orc.pyx index 918880648bf..d3e6053ef4b 100644 --- a/python/cudf/cudf/_lib/orc.pyx +++ b/python/cudf/cudf/_lib/orc.pyx @@ -14,17 +14,23 @@ from libcpp.vector cimport vector import datetime from collections import OrderedDict -cimport cudf._lib.cpp.lists.lists_column_view as cpp_lists_column_view +cimport cudf._lib.pylibcudf.libcudf.lists.lists_column_view as cpp_lists_column_view try: import ujson as json except ImportError: import json -cimport cudf._lib.cpp.io.types as cudf_io_types +cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types from cudf._lib.column cimport Column -from cudf._lib.cpp.io.data_sink cimport data_sink -from cudf._lib.cpp.io.orc cimport ( +from cudf._lib.io.datasource cimport NativeFileDatasource +from cudf._lib.io.utils cimport ( + make_sink_info, + make_source_info, + update_column_struct_field_names, +) +from cudf._lib.pylibcudf.libcudf.io.data_sink cimport data_sink +from cudf._lib.pylibcudf.libcudf.io.orc cimport ( chunked_orc_writer_options, orc_chunked_writer, orc_reader_options, @@ -32,7 +38,7 @@ from cudf._lib.cpp.io.orc cimport ( read_orc as libcudf_read_orc, write_orc as libcudf_write_orc, ) -from cudf._lib.cpp.io.orc_metadata cimport ( +from cudf._lib.pylibcudf.libcudf.io.orc_metadata cimport ( binary_statistics, bucket_statistics, column_statistics, @@ -47,7 +53,7 @@ from cudf._lib.cpp.io.orc_metadata cimport ( string_statistics, timestamp_statistics, ) -from cudf._lib.cpp.io.types cimport ( +from cudf._lib.pylibcudf.libcudf.io.types cimport ( column_in_metadata, compression_type, sink_info, @@ -55,14 +61,8 @@ from cudf._lib.cpp.io.types cimport ( table_input_metadata, table_with_metadata, ) -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport data_type, size_type, type_id -from cudf._lib.io.datasource cimport NativeFileDatasource -from cudf._lib.io.utils cimport ( - make_sink_info, - make_source_info, - update_column_struct_field_names, -) +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type, type_id from cudf._lib.variant cimport get_if as std_get_if, holds_alternative from cudf._lib.types import SUPPORTED_NUMPY_TO_LIBCUDF_TYPES diff --git a/python/cudf/cudf/_lib/parquet.pyx b/python/cudf/cudf/_lib/parquet.pyx index d40218e906b..d0d9a18f3f0 100644 --- a/python/cudf/cudf/_lib/parquet.pyx +++ b/python/cudf/cudf/_lib/parquet.pyx @@ -31,12 +31,19 @@ from libcpp.unordered_map cimport unordered_map from libcpp.utility cimport move from libcpp.vector cimport vector -cimport cudf._lib.cpp.io.data_sink as cudf_io_data_sink -cimport cudf._lib.cpp.io.types as cudf_io_types -cimport cudf._lib.cpp.types as cudf_types +cimport cudf._lib.pylibcudf.libcudf.io.data_sink as cudf_io_data_sink +cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types +cimport cudf._lib.pylibcudf.libcudf.types as cudf_types from cudf._lib.column cimport Column -from cudf._lib.cpp.expressions cimport expression -from cudf._lib.cpp.io.parquet cimport ( +from cudf._lib.expressions cimport Expression +from cudf._lib.io.datasource cimport NativeFileDatasource +from cudf._lib.io.utils cimport ( + make_sinks_info, + make_source_info, + update_struct_field_names, +) +from cudf._lib.pylibcudf.libcudf.expressions cimport expression +from cudf._lib.pylibcudf.libcudf.io.parquet cimport ( chunked_parquet_writer_options, merge_row_group_metadata as parquet_merge_metadata, parquet_chunked_writer as cpp_parquet_chunked_writer, @@ -46,20 +53,16 @@ from cudf._lib.cpp.io.parquet cimport ( read_parquet as parquet_reader, write_parquet as parquet_writer, ) -from cudf._lib.cpp.io.parquet_metadata cimport ( +from cudf._lib.pylibcudf.libcudf.io.parquet_metadata cimport ( parquet_metadata, read_parquet_metadata as parquet_metadata_reader, ) -from cudf._lib.cpp.io.types cimport column_in_metadata, table_input_metadata -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport data_type, size_type -from cudf._lib.expressions cimport Expression -from cudf._lib.io.datasource cimport NativeFileDatasource -from cudf._lib.io.utils cimport ( - make_sinks_info, - make_source_info, - update_struct_field_names, +from cudf._lib.pylibcudf.libcudf.io.types cimport ( + column_in_metadata, + table_input_metadata, ) +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type from cudf._lib.utils cimport table_view_from_table from pyarrow.lib import NativeFile diff --git a/python/cudf/cudf/_lib/partitioning.pyx b/python/cudf/cudf/_lib/partitioning.pyx index 4bf8b32ea7e..708ec4174aa 100644 --- a/python/cudf/cudf/_lib/partitioning.pyx +++ b/python/cudf/cudf/_lib/partitioning.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -8,16 +8,18 @@ from libcpp.utility cimport move from libcpp.vector cimport vector from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.partitioning cimport partition as cpp_partition -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.partitioning cimport ( + partition as cpp_partition, +) +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view from cudf._lib.utils cimport columns_from_unique_ptr, table_view_from_columns from cudf._lib.reduce import minmax from cudf._lib.stream_compaction import distinct_count as cpp_distinct_count -cimport cudf._lib.cpp.types as libcudf_types +cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/pylibcudf/CMakeLists.txt b/python/cudf/cudf/_lib/pylibcudf/CMakeLists.txt index c2b7cb7ca3d..efc978fc6d0 100644 --- a/python/cudf/cudf/_lib/pylibcudf/CMakeLists.txt +++ b/python/cudf/cudf/_lib/pylibcudf/CMakeLists.txt @@ -45,4 +45,5 @@ rapids_cython_create_modules( ) link_to_pyarrow_headers(pylibcudf_interop) +add_subdirectory(libcudf) add_subdirectory(strings) diff --git a/python/cudf/cudf/_lib/pylibcudf/aggregation.pxd b/python/cudf/cudf/_lib/pylibcudf/aggregation.pxd index a9491793b88..8526728656b 100644 --- a/python/cudf/cudf/_lib/pylibcudf/aggregation.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/aggregation.pxd @@ -2,7 +2,7 @@ from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.aggregation cimport ( +from cudf._lib.pylibcudf.libcudf.aggregation cimport ( Kind as kind_t, aggregation, correlation_type, @@ -14,7 +14,7 @@ from cudf._lib.cpp.aggregation cimport ( rolling_aggregation, scan_aggregation, ) -from cudf._lib.cpp.types cimport ( +from cudf._lib.pylibcudf.libcudf.types cimport ( interpolation, nan_equality, null_equality, diff --git a/python/cudf/cudf/_lib/pylibcudf/aggregation.pyx b/python/cudf/cudf/_lib/pylibcudf/aggregation.pyx index fe7daea38bf..672b1ba2221 100644 --- a/python/cudf/cudf/_lib/pylibcudf/aggregation.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/aggregation.pyx @@ -5,7 +5,7 @@ from libcpp.cast cimport dynamic_cast from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.cpp.aggregation cimport ( +from cudf._lib.pylibcudf.libcudf.aggregation cimport ( aggregation, correlation_type, groupby_aggregation, @@ -39,7 +39,7 @@ from cudf._lib.cpp.aggregation cimport ( rolling_aggregation, scan_aggregation, ) -from cudf._lib.cpp.types cimport ( +from cudf._lib.pylibcudf.libcudf.types cimport ( interpolation, nan_equality, null_equality, @@ -49,14 +49,16 @@ from cudf._lib.cpp.types cimport ( size_type, ) -from cudf._lib.cpp.aggregation import Kind # no-cython-lint -from cudf._lib.cpp.aggregation import \ +from cudf._lib.pylibcudf.libcudf.aggregation import Kind # no-cython-lint +from cudf._lib.pylibcudf.libcudf.aggregation import \ correlation_type as CorrelationType # no-cython-lint -from cudf._lib.cpp.aggregation import \ +from cudf._lib.pylibcudf.libcudf.aggregation import \ rank_method as RankMethod # no-cython-lint -from cudf._lib.cpp.aggregation import \ +from cudf._lib.pylibcudf.libcudf.aggregation import \ rank_percentage as RankPercentage # no-cython-lint -from cudf._lib.cpp.aggregation import udf_type as UdfType # no-cython-lint +from cudf._lib.pylibcudf.libcudf.aggregation import ( # no-cython-lint + udf_type as UdfType, +) from .types cimport DataType diff --git a/python/cudf/cudf/_lib/pylibcudf/binaryop.pxd b/python/cudf/cudf/_lib/pylibcudf/binaryop.pxd index 0aa6aac7b39..9a8c8e49dcf 100644 --- a/python/cudf/cudf/_lib/pylibcudf/binaryop.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/binaryop.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.cpp.binaryop cimport binary_operator +from cudf._lib.pylibcudf.libcudf.binaryop cimport binary_operator from .column cimport Column from .scalar cimport Scalar diff --git a/python/cudf/cudf/_lib/pylibcudf/binaryop.pyx b/python/cudf/cudf/_lib/pylibcudf/binaryop.pyx index 16de7757469..c1d669c3c1c 100644 --- a/python/cudf/cudf/_lib/pylibcudf/binaryop.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/binaryop.pyx @@ -5,11 +5,11 @@ from cython.operator import dereference from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.cpp cimport binaryop as cpp_binaryop -from cudf._lib.cpp.binaryop cimport binary_operator -from cudf._lib.cpp.column.column cimport column +from cudf._lib.pylibcudf.libcudf cimport binaryop as cpp_binaryop +from cudf._lib.pylibcudf.libcudf.binaryop cimport binary_operator +from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.cpp.binaryop import \ +from cudf._lib.pylibcudf.libcudf.binaryop import \ binary_operator as BinaryOperator # no-cython-lint from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/column.pxd b/python/cudf/cudf/_lib/pylibcudf/column.pxd index 66ccdb53d1a..e121e856865 100644 --- a/python/cudf/cudf/_lib/pylibcudf/column.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/column.pxd @@ -3,9 +3,12 @@ from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view, mutable_column_view -from cudf._lib.cpp.types cimport bitmask_type, size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( + column_view, + mutable_column_view, +) +from cudf._lib.pylibcudf.libcudf.types cimport bitmask_type, size_type from .gpumemoryview cimport gpumemoryview from .types cimport DataType diff --git a/python/cudf/cudf/_lib/pylibcudf/column.pyx b/python/cudf/cudf/_lib/pylibcudf/column.pyx index b9e5e48226d..e726eca154f 100644 --- a/python/cudf/cudf/_lib/pylibcudf/column.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/column.pyx @@ -6,10 +6,12 @@ from libcpp.utility cimport move from rmm._lib.device_buffer cimport DeviceBuffer -from cudf._lib.cpp.column.column cimport column, column_contents -from cudf._lib.cpp.column.column_factories cimport make_column_from_scalar -from cudf._lib.cpp.scalar.scalar cimport scalar -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column, column_contents +from cudf._lib.pylibcudf.libcudf.column.column_factories cimport ( + make_column_from_scalar, +) +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.types cimport size_type from .gpumemoryview cimport gpumemoryview from .scalar cimport Scalar diff --git a/python/cudf/cudf/_lib/pylibcudf/concatenate.pyx b/python/cudf/cudf/_lib/pylibcudf/concatenate.pyx index ce7ef84e20e..5e40f921b2c 100644 --- a/python/cudf/cudf/_lib/pylibcudf/concatenate.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/concatenate.pyx @@ -4,11 +4,11 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector -from cudf._lib.cpp cimport concatenate as cpp_concatenate -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf cimport concatenate as cpp_concatenate +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/copying.pxd b/python/cudf/cudf/_lib/pylibcudf/copying.pxd index 0211d122c8e..06543d3ca92 100644 --- a/python/cudf/cudf/_lib/pylibcudf/copying.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/copying.pxd @@ -2,8 +2,11 @@ from libcpp cimport bool as cbool -from cudf._lib.cpp.copying cimport mask_allocation_policy, out_of_bounds_policy -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.copying cimport ( + mask_allocation_policy, + out_of_bounds_policy, +) +from cudf._lib.pylibcudf.libcudf.types cimport size_type from .column cimport Column from .scalar cimport Scalar diff --git a/python/cudf/cudf/_lib/pylibcudf/copying.pyx b/python/cudf/cudf/_lib/pylibcudf/copying.pyx index 125a4ffe65f..2d59deb3864 100644 --- a/python/cudf/cudf/_lib/pylibcudf/copying.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/copying.pyx @@ -11,18 +11,24 @@ from libcpp.vector cimport vector # directly from that. It will make namespacing much cleaner in pylibcudf. What # we really want here would be # cimport libcudf... libcudf.copying.algo(...) -from cudf._lib.cpp cimport copying as cpp_copying -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view, mutable_column_view -from cudf._lib.cpp.copying cimport mask_allocation_policy, out_of_bounds_policy -from cudf._lib.cpp.scalar.scalar cimport scalar -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport size_type - -from cudf._lib.cpp.copying import \ +from cudf._lib.pylibcudf.libcudf cimport copying as cpp_copying +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( + column_view, + mutable_column_view, +) +from cudf._lib.pylibcudf.libcudf.copying cimport ( + mask_allocation_policy, + out_of_bounds_policy, +) +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type + +from cudf._lib.pylibcudf.libcudf.copying import \ mask_allocation_policy as MaskAllocationPolicy # no-cython-lint -from cudf._lib.cpp.copying import \ +from cudf._lib.pylibcudf.libcudf.copying import \ out_of_bounds_policy as OutOfBoundsPolicy # no-cython-lint from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/filling.pxd b/python/cudf/cudf/_lib/pylibcudf/filling.pxd index 55dbd7b075f..3560ebf2ea2 100644 --- a/python/cudf/cudf/_lib/pylibcudf/filling.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/filling.pxd @@ -1,5 +1,5 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.types cimport size_type from .column cimport Column from .scalar cimport Scalar diff --git a/python/cudf/cudf/_lib/pylibcudf/filling.pyx b/python/cudf/cudf/_lib/pylibcudf/filling.pyx index 588ab58a146..05f67681428 100644 --- a/python/cudf/cudf/_lib/pylibcudf/filling.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/filling.pyx @@ -4,15 +4,15 @@ from cython.operator cimport dereference from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.filling cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.filling cimport ( fill as cpp_fill, fill_in_place as cpp_fill_in_place, repeat as cpp_repeat, sequence as cpp_sequence, ) -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.types cimport size_type from .column cimport Column from .scalar cimport Scalar diff --git a/python/cudf/cudf/_lib/pylibcudf/groupby.pxd b/python/cudf/cudf/_lib/pylibcudf/groupby.pxd index f1b7a25d5f9..c6c146b0445 100644 --- a/python/cudf/cudf/_lib/pylibcudf/groupby.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/groupby.pxd @@ -4,18 +4,18 @@ from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.vector cimport vector -from cudf._lib.cpp.aggregation cimport ( +from cudf._lib.pylibcudf.libcudf.aggregation cimport ( aggregation, groupby_aggregation, groupby_scan_aggregation, ) -from cudf._lib.cpp.groupby cimport ( +from cudf._lib.pylibcudf.libcudf.groupby cimport ( aggregation_request, aggregation_result, groupby, scan_request, ) -from cudf._lib.cpp.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table cimport table from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/groupby.pyx b/python/cudf/cudf/_lib/pylibcudf/groupby.pyx index 3b800abf266..46fe61025ce 100644 --- a/python/cudf/cudf/_lib/pylibcudf/groupby.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/groupby.pyx @@ -7,17 +7,17 @@ from libcpp.pair cimport pair from libcpp.utility cimport move from libcpp.vector cimport vector -from cudf._lib.cpp.groupby cimport ( +from cudf._lib.pylibcudf.libcudf.groupby cimport ( aggregation_request, aggregation_result, groupby, groups, scan_request, ) -from cudf._lib.cpp.replace cimport replace_policy -from cudf._lib.cpp.scalar.scalar cimport scalar -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.replace cimport replace_policy +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.types cimport size_type from .aggregation cimport Aggregation from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/interop.pyx b/python/cudf/cudf/_lib/pylibcudf/interop.pyx index 8dc41fccc0c..f172080cece 100644 --- a/python/cudf/cudf/_lib/pylibcudf/interop.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/interop.pyx @@ -11,14 +11,17 @@ from functools import singledispatch from pyarrow import lib as pa -from cudf._lib.cpp.interop cimport ( +from cudf._lib.pylibcudf.libcudf.interop cimport ( column_metadata, from_arrow as cpp_from_arrow, to_arrow as cpp_to_arrow, ) -from cudf._lib.cpp.scalar.scalar cimport fixed_point_scalar, scalar -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.wrappers.decimals cimport ( +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport ( + fixed_point_scalar, + scalar, +) +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.wrappers.decimals cimport ( decimal32, decimal64, decimal128, diff --git a/python/cudf/cudf/_lib/pylibcudf/join.pxd b/python/cudf/cudf/_lib/pylibcudf/join.pxd index ff7dec97596..f560eeef06d 100644 --- a/python/cudf/cudf/_lib/pylibcudf/join.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/join.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.cpp.types cimport null_equality +from cudf._lib.pylibcudf.libcudf.types cimport null_equality from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/join.pyx b/python/cudf/cudf/_lib/pylibcudf/join.pyx index 3710a84e594..cf2a6a8187f 100644 --- a/python/cudf/cudf/_lib/pylibcudf/join.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/join.pyx @@ -7,9 +7,14 @@ from libcpp.utility cimport move from rmm._lib.device_buffer cimport device_buffer -from cudf._lib.cpp cimport join as cpp_join -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.types cimport data_type, null_equality, size_type, type_id +from cudf._lib.pylibcudf.libcudf cimport join as cpp_join +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.types cimport ( + data_type, + null_equality, + size_type, + type_id, +) from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/cpp/CMakeLists.txt b/python/cudf/cudf/_lib/pylibcudf/libcudf/CMakeLists.txt similarity index 100% rename from python/cudf/cudf/_lib/cpp/CMakeLists.txt rename to python/cudf/cudf/_lib/pylibcudf/libcudf/CMakeLists.txt diff --git a/python/cudf/cudf/_lib/cpp/__init__.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/__init__.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/__init__.pxd diff --git a/python/cudf/cudf/_lib/cpp/__init__.py b/python/cudf/cudf/_lib/pylibcudf/libcudf/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/cpp/__init__.py rename to python/cudf/cudf/_lib/pylibcudf/libcudf/__init__.py diff --git a/python/cudf/cudf/_lib/cpp/aggregation.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/aggregation.pxd similarity index 98% rename from python/cudf/cudf/_lib/cpp/aggregation.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/aggregation.pxd index 91b9d7d024f..e0e01207589 100644 --- a/python/cudf/cudf/_lib/cpp/aggregation.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/aggregation.pxd @@ -5,7 +5,7 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector -from cudf._lib.cpp.types cimport ( +from cudf._lib.pylibcudf.libcudf.types cimport ( data_type, interpolation, nan_equality, diff --git a/python/cudf/cudf/_lib/cpp/aggregation.pyx b/python/cudf/cudf/_lib/pylibcudf/libcudf/aggregation.pyx similarity index 100% rename from python/cudf/cudf/_lib/cpp/aggregation.pyx rename to python/cudf/cudf/_lib/pylibcudf/libcudf/aggregation.pyx diff --git a/python/cudf/cudf/_lib/cpp/binaryop.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/binaryop.pxd similarity index 84% rename from python/cudf/cudf/_lib/cpp/binaryop.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/binaryop.pxd index 735216e656a..788a94a0bbc 100644 --- a/python/cudf/cudf/_lib/cpp/binaryop.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/binaryop.pxd @@ -4,10 +4,10 @@ from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr from libcpp.string cimport string -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport scalar -from cudf._lib.cpp.types cimport data_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/binaryop.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/binaryop.pyx b/python/cudf/cudf/_lib/pylibcudf/libcudf/binaryop.pyx similarity index 100% rename from python/cudf/cudf/_lib/cpp/binaryop.pyx rename to python/cudf/cudf/_lib/pylibcudf/libcudf/binaryop.pyx diff --git a/python/cudf/cudf/_lib/cpp/column/__init__.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/column/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/column/__init__.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/column/__init__.pxd diff --git a/python/cudf/cudf/_lib/cpp/column/__init__.py b/python/cudf/cudf/_lib/pylibcudf/libcudf/column/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/cpp/column/__init__.py rename to python/cudf/cudf/_lib/pylibcudf/libcudf/column/__init__.py diff --git a/python/cudf/cudf/_lib/cpp/column/column.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/column/column.pxd similarity index 78% rename from python/cudf/cudf/_lib/cpp/column/column.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/column/column.pxd index 136f1d795a9..dd184d31cc6 100644 --- a/python/cudf/cudf/_lib/cpp/column/column.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/column/column.pxd @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp cimport bool from libcpp.memory cimport unique_ptr @@ -6,8 +6,11 @@ from libcpp.vector cimport vector from rmm._lib.device_buffer cimport device_buffer -from cudf._lib.cpp.column.column_view cimport column_view, mutable_column_view -from cudf._lib.cpp.types cimport data_type, size_type +from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( + column_view, + mutable_column_view, +) +from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type cdef extern from "cudf/column/column.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/column/column_factories.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/column/column_factories.pxd similarity index 65% rename from python/cudf/cudf/_lib/cpp/column/column_factories.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/column/column_factories.pxd index 0f22e788bd7..fd22d92cb30 100644 --- a/python/cudf/cudf/_lib/cpp/column/column_factories.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/column/column_factories.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.scalar.scalar cimport scalar -from cudf._lib.cpp.types cimport data_type, mask_state, size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.types cimport data_type, mask_state, size_type cdef extern from "cudf/column/column_factories.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/column/column_view.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/column/column_view.pxd similarity index 95% rename from python/cudf/cudf/_lib/cpp/column/column_view.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/column/column_view.pxd index edd013d9340..c6403babe89 100644 --- a/python/cudf/cudf/_lib/cpp/column/column_view.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/column/column_view.pxd @@ -1,9 +1,13 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp cimport bool from libcpp.vector cimport vector -from cudf._lib.cpp.types cimport bitmask_type, data_type, size_type +from cudf._lib.pylibcudf.libcudf.types cimport ( + bitmask_type, + data_type, + size_type, +) cdef extern from "cudf/column/column_view.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/concatenate.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/concatenate.pxd similarity index 77% rename from python/cudf/cudf/_lib/cpp/concatenate.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/concatenate.pxd index a64c7426f5e..0c362390ff2 100644 --- a/python/cudf/cudf/_lib/cpp/concatenate.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/concatenate.pxd @@ -5,9 +5,9 @@ from libcpp.vector cimport vector from rmm._lib.device_buffer cimport device_buffer -from cudf._lib.cpp.column.column cimport column, column_view -from cudf._lib.cpp.table.table cimport table, table_view -from cudf._lib.cpp.utilities.host_span cimport host_span +from cudf._lib.pylibcudf.libcudf.column.column cimport column, column_view +from cudf._lib.pylibcudf.libcudf.table.table cimport table, table_view +from cudf._lib.pylibcudf.libcudf.utilities.host_span cimport host_span cdef extern from "cudf/concatenate.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/contiguous_split.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/contiguous_split.pxd similarity index 80% rename from python/cudf/cudf/_lib/cpp/contiguous_split.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/contiguous_split.pxd index 134e4ed0723..b06feacb016 100644 --- a/python/cudf/cudf/_lib/cpp/contiguous_split.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/contiguous_split.pxd @@ -1,4 +1,4 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. from libc.stdint cimport uint8_t from libcpp.memory cimport unique_ptr @@ -6,8 +6,8 @@ from libcpp.vector cimport vector from rmm._lib.device_buffer cimport device_buffer -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/contiguous_split.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/copying.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/copying.pxd similarity index 91% rename from python/cudf/cudf/_lib/cpp/copying.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/copying.pxd index 053e2299f22..001489d69bf 100644 --- a/python/cudf/cudf/_lib/cpp/copying.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/copying.pxd @@ -8,13 +8,16 @@ from libcpp.vector cimport vector from rmm._lib.device_buffer cimport device_buffer -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view, mutable_column_view -from cudf._lib.cpp.scalar.scalar cimport scalar -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport size_type from cudf._lib.exception_handler cimport cudf_exception_handler +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( + column_view, + mutable_column_view, +) +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type ctypedef const scalar constscalar diff --git a/python/cudf/cudf/_lib/cpp/copying.pyx b/python/cudf/cudf/_lib/pylibcudf/libcudf/copying.pyx similarity index 100% rename from python/cudf/cudf/_lib/cpp/copying.pyx rename to python/cudf/cudf/_lib/pylibcudf/libcudf/copying.pyx diff --git a/python/cudf/cudf/_lib/cpp/datetime.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/datetime.pxd similarity index 90% rename from python/cudf/cudf/_lib/cpp/datetime.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/datetime.pxd index d03587745e1..7db77b9c7c5 100644 --- a/python/cudf/cudf/_lib/cpp/datetime.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/datetime.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar cdef extern from "cudf/datetime.hpp" namespace "cudf::datetime" nogil: diff --git a/python/cudf/cudf/_lib/cpp/expressions.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/expressions.pxd similarity index 92% rename from python/cudf/cudf/_lib/cpp/expressions.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/expressions.pxd index 291afbcc62a..279d969db50 100644 --- a/python/cudf/cudf/_lib/cpp/expressions.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/expressions.pxd @@ -1,16 +1,16 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.string cimport string -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.scalar.scalar cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport ( duration_scalar, numeric_scalar, timestamp_scalar, ) -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/ast/expressions.hpp" namespace "cudf::ast" nogil: diff --git a/python/cudf/cudf/_lib/cpp/filling.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/filling.pxd similarity index 67% rename from python/cudf/cudf/_lib/cpp/filling.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/filling.pxd index e412f294537..16ed682f930 100644 --- a/python/cudf/cudf/_lib/cpp/filling.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/filling.pxd @@ -1,14 +1,17 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp cimport bool from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view, mutable_column_view -from cudf._lib.cpp.scalar.scalar cimport scalar -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( + column_view, + mutable_column_view, +) +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/filling.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/groupby.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/groupby.pxd similarity index 83% rename from python/cudf/cudf/_lib/cpp/groupby.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/groupby.pxd index 8bbefcde0dd..16607cc3711 100644 --- a/python/cudf/cudf/_lib/cpp/groupby.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/groupby.pxd @@ -6,24 +6,24 @@ from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.vector cimport vector -from cudf._lib.cpp.aggregation cimport ( +from cudf._lib.pylibcudf.libcudf.aggregation cimport ( groupby_aggregation, groupby_scan_aggregation, ) -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.replace cimport replace_policy -from cudf._lib.cpp.scalar.scalar cimport scalar -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.replace cimport replace_policy +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport ( null_order, null_policy, order, size_type, sorted, ) -from cudf._lib.cpp.utilities.host_span cimport host_span +from cudf._lib.pylibcudf.libcudf.utilities.host_span cimport host_span # workaround for https://github.com/cython/cython/issues/3885 ctypedef const scalar constscalar diff --git a/python/cudf/cudf/_lib/cpp/hash.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/hash.pxd similarity index 86% rename from python/cudf/cudf/_lib/cpp/hash.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/hash.pxd index d55e244dc2c..5346252df69 100644 --- a/python/cudf/cudf/_lib/cpp/hash.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/hash.pxd @@ -4,9 +4,9 @@ from libc.stdint cimport uint32_t, uint64_t from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/hashing.hpp" namespace "cudf::hashing" nogil: diff --git a/python/cudf/cudf/_lib/cpp/interop.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/interop.pxd similarity index 83% rename from python/cudf/cudf/_lib/cpp/interop.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/interop.pxd index 88e9d83ee98..471b78505fb 100644 --- a/python/cudf/cudf/_lib/cpp/interop.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/interop.pxd @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport shared_ptr, unique_ptr from libcpp.string cimport string @@ -7,9 +7,9 @@ from pyarrow.lib cimport CScalar, CTable from cudf._lib.types import cudf_to_np_types, np_to_cudf_types -from cudf._lib.cpp.scalar.scalar cimport scalar -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "dlpack/dlpack.h" nogil: diff --git a/python/cudf/cudf/_lib/cpp/io/__init__.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/io/__init__.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/io/__init__.pxd diff --git a/python/cudf/cudf/_lib/cpp/io/__init__.py b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/cpp/io/__init__.py rename to python/cudf/cudf/_lib/pylibcudf/libcudf/io/__init__.py diff --git a/python/cudf/cudf/_lib/cpp/io/arrow_io_source.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/arrow_io_source.pxd similarity index 77% rename from python/cudf/cudf/_lib/cpp/io/arrow_io_source.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/io/arrow_io_source.pxd index 4aef4841844..1d2138f8d10 100644 --- a/python/cudf/cudf/_lib/cpp/io/arrow_io_source.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/arrow_io_source.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. from libcpp.memory cimport shared_ptr from libcpp.string cimport string from pyarrow.includes.libarrow cimport CRandomAccessFile -cimport cudf._lib.cpp.io.datasource as cudf_io_datasource +cimport cudf._lib.pylibcudf.libcudf.io.datasource as cudf_io_datasource cdef extern from "cudf/io/arrow_io_source.hpp" \ diff --git a/python/cudf/cudf/_lib/cpp/io/avro.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/avro.pxd similarity index 88% rename from python/cudf/cudf/_lib/cpp/io/avro.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/io/avro.pxd index 9b683e5bce3..530df5aa8f1 100644 --- a/python/cudf/cudf/_lib/cpp/io/avro.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/avro.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.string cimport string from libcpp.vector cimport vector -cimport cudf._lib.cpp.io.types as cudf_io_types -from cudf._lib.cpp.types cimport size_type +cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/io/avro.hpp" \ diff --git a/python/cudf/cudf/_lib/cpp/io/csv.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/csv.pxd similarity index 97% rename from python/cudf/cudf/_lib/cpp/io/csv.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/io/csv.pxd index e7c0fec2e3d..754dd37d53f 100644 --- a/python/cudf/cudf/_lib/cpp/io/csv.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/csv.pxd @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libc.stdint cimport uint8_t from libcpp cimport bool @@ -7,9 +7,9 @@ from libcpp.memory cimport shared_ptr, unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector -cimport cudf._lib.cpp.io.types as cudf_io_types -cimport cudf._lib.cpp.table.table_view as cudf_table_view -from cudf._lib.cpp.types cimport data_type, size_type +cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types +cimport cudf._lib.pylibcudf.libcudf.table.table_view as cudf_table_view +from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type cdef extern from "cudf/io/csv.hpp" \ diff --git a/python/cudf/cudf/_lib/cpp/io/data_sink.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/data_sink.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/io/data_sink.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/io/data_sink.pxd diff --git a/python/cudf/cudf/_lib/cpp/io/datasource.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/datasource.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/io/datasource.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/io/datasource.pxd diff --git a/python/cudf/cudf/_lib/cpp/io/json.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/json.pxd similarity index 96% rename from python/cudf/cudf/_lib/cpp/io/json.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/io/json.pxd index 1e1057beede..7e64a4cae29 100644 --- a/python/cudf/cudf/_lib/cpp/io/json.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/json.pxd @@ -7,9 +7,9 @@ from libcpp.memory cimport shared_ptr, unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector -cimport cudf._lib.cpp.io.types as cudf_io_types -cimport cudf._lib.cpp.table.table_view as cudf_table_view -from cudf._lib.cpp.types cimport data_type, size_type +cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types +cimport cudf._lib.pylibcudf.libcudf.table.table_view as cudf_table_view +from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type cdef extern from "cudf/io/json.hpp" \ diff --git a/python/cudf/cudf/_lib/cpp/io/orc.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/orc.pxd similarity index 97% rename from python/cudf/cudf/_lib/cpp/io/orc.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/io/orc.pxd index d5bb1726a43..e553515dfdf 100644 --- a/python/cudf/cudf/_lib/cpp/io/orc.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/orc.pxd @@ -8,9 +8,9 @@ from libcpp.optional cimport optional from libcpp.string cimport string from libcpp.vector cimport vector -cimport cudf._lib.cpp.io.types as cudf_io_types -cimport cudf._lib.cpp.table.table_view as cudf_table_view -from cudf._lib.cpp.types cimport data_type, size_type +cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types +cimport cudf._lib.pylibcudf.libcudf.table.table_view as cudf_table_view +from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type cdef extern from "cudf/io/orc.hpp" \ diff --git a/python/cudf/cudf/_lib/cpp/io/orc_metadata.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/orc_metadata.pxd similarity index 96% rename from python/cudf/cudf/_lib/cpp/io/orc_metadata.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/io/orc_metadata.pxd index aad4f1c6870..a23655b06f8 100644 --- a/python/cudf/cudf/_lib/cpp/io/orc_metadata.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/orc_metadata.pxd @@ -6,7 +6,7 @@ from libcpp.optional cimport optional from libcpp.string cimport string from libcpp.vector cimport vector -cimport cudf._lib.cpp.io.types as cudf_io_types +cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types from cudf._lib.variant cimport monostate, variant diff --git a/python/cudf/cudf/_lib/cpp/io/parquet.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/parquet.pxd similarity index 97% rename from python/cudf/cudf/_lib/cpp/io/parquet.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/io/parquet.pxd index 1680eb43700..b7f3f89f71c 100644 --- a/python/cudf/cudf/_lib/cpp/io/parquet.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/parquet.pxd @@ -9,10 +9,10 @@ from libcpp.optional cimport optional from libcpp.string cimport string from libcpp.vector cimport vector -cimport cudf._lib.cpp.io.types as cudf_io_types -cimport cudf._lib.cpp.table.table_view as cudf_table_view -from cudf._lib.cpp.expressions cimport expression -from cudf._lib.cpp.types cimport data_type, size_type +cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types +cimport cudf._lib.pylibcudf.libcudf.table.table_view as cudf_table_view +from cudf._lib.pylibcudf.libcudf.expressions cimport expression +from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type cdef extern from "cudf/io/parquet.hpp" namespace "cudf::io" nogil: diff --git a/python/cudf/cudf/_lib/cpp/io/parquet_metadata.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/parquet_metadata.pxd similarity index 89% rename from python/cudf/cudf/_lib/cpp/io/parquet_metadata.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/io/parquet_metadata.pxd index e9def2aea5d..34a299b73ab 100644 --- a/python/cudf/cudf/_lib/cpp/io/parquet_metadata.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/parquet_metadata.pxd @@ -5,8 +5,8 @@ from libcpp.string cimport string from libcpp.unordered_map cimport unordered_map from libcpp.vector cimport vector -cimport cudf._lib.cpp.io.types as cudf_io_types -from cudf._lib.cpp.types cimport size_type +cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/io/parquet_metadata.hpp" namespace "cudf::io" nogil: diff --git a/python/cudf/cudf/_lib/cpp/io/text.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/text.pxd similarity index 93% rename from python/cudf/cudf/_lib/cpp/io/text.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/io/text.pxd index 368b014ea4b..bec223d4079 100644 --- a/python/cudf/cudf/_lib/cpp/io/text.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/text.pxd @@ -1,11 +1,11 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libc.stdint cimport uint64_t from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.string cimport string -from cudf._lib.cpp.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column cimport column cdef extern from "cudf/io/text/byte_range_info.hpp" \ diff --git a/python/cudf/cudf/_lib/cpp/io/timezone.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/timezone.pxd similarity index 75% rename from python/cudf/cudf/_lib/cpp/io/timezone.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/io/timezone.pxd index 927c2118473..88cb5544dc1 100644 --- a/python/cudf/cudf/_lib/cpp/io/timezone.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/timezone.pxd @@ -1,11 +1,11 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.optional cimport optional from libcpp.string cimport string -from cudf._lib.cpp.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table cimport table cdef extern from "cudf/timezone.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/io/types.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/types.pxd similarity index 94% rename from python/cudf/cudf/_lib/cpp/io/types.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/io/types.pxd index 4af848f9c1c..cdc0c44ebb5 100644 --- a/python/cudf/cudf/_lib/cpp/io/types.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/io/types.pxd @@ -10,11 +10,11 @@ from libcpp.unordered_map cimport unordered_map from libcpp.vector cimport vector from pyarrow.includes.libarrow cimport CRandomAccessFile -cimport cudf._lib.cpp.io.data_sink as cudf_io_data_sink -cimport cudf._lib.cpp.io.datasource as cudf_io_datasource -cimport cudf._lib.cpp.table.table_view as cudf_table_view -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.types cimport size_type +cimport cudf._lib.pylibcudf.libcudf.io.data_sink as cudf_io_data_sink +cimport cudf._lib.pylibcudf.libcudf.io.datasource as cudf_io_datasource +cimport cudf._lib.pylibcudf.libcudf.table.table_view as cudf_table_view +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/io/types.hpp" \ diff --git a/python/cudf/cudf/_lib/cpp/join.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/join.pxd similarity index 87% rename from python/cudf/cudf/_lib/cpp/join.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/join.pxd index 7508052646a..89a30f0f255 100644 --- a/python/cudf/cudf/_lib/cpp/join.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/join.pxd @@ -7,10 +7,10 @@ from libcpp.vector cimport vector from rmm._lib.device_uvector cimport device_uvector -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport null_equality, size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport null_equality, size_type ctypedef unique_ptr[device_uvector[size_type]] gather_map_type ctypedef pair[gather_map_type, gather_map_type] gather_map_pair_type diff --git a/python/cudf/cudf/_lib/cpp/labeling.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/labeling.pxd similarity index 71% rename from python/cudf/cudf/_lib/cpp/labeling.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/labeling.pxd index af9c4bb9a04..54731bf29af 100644 --- a/python/cudf/cudf/_lib/cpp/labeling.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/labeling.pxd @@ -1,9 +1,9 @@ -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/labeling/label_bins.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/lists/__init__.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/lists/__init__.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/lists/__init__.pxd diff --git a/python/cudf/cudf/_lib/cpp/lists/__init__.py b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/cpp/lists/__init__.py rename to python/cudf/cudf/_lib/pylibcudf/libcudf/lists/__init__.py diff --git a/python/cudf/cudf/_lib/cpp/lists/combine.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/combine.pxd similarity index 73% rename from python/cudf/cudf/_lib/cpp/lists/combine.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/lists/combine.pxd index a7ad8e7ba41..728bd840f71 100644 --- a/python/cudf/cudf/_lib/cpp/lists/combine.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/combine.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/lists/combine.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/cpp/lists/contains.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/contains.pxd similarity index 63% rename from python/cudf/cudf/_lib/cpp/lists/contains.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/lists/contains.pxd index e86c73deed2..721679f35c7 100644 --- a/python/cudf/cudf/_lib/cpp/lists/contains.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/contains.pxd @@ -1,12 +1,14 @@ -# Copyright (c) 2021-2023, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.lists.lists_column_view cimport lists_column_view -from cudf._lib.cpp.scalar.scalar cimport scalar from cudf._lib.exception_handler cimport cudf_exception_handler +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( + lists_column_view, +) +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar cdef extern from "cudf/lists/contains.hpp" namespace "cudf::lists" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/count_elements.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/count_elements.pxd new file mode 100644 index 00000000000..38bdd4db0bb --- /dev/null +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/count_elements.pxd @@ -0,0 +1,12 @@ +# Copyright (c) 2021-2024, NVIDIA CORPORATION. + +from libcpp.memory cimport unique_ptr + +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( + lists_column_view, +) + + +cdef extern from "cudf/lists/count_elements.hpp" namespace "cudf::lists" nogil: + cdef unique_ptr[column] count_elements(const lists_column_view) except + diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/explode.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/explode.pxd new file mode 100644 index 00000000000..622a866f593 --- /dev/null +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/explode.pxd @@ -0,0 +1,14 @@ +# Copyright (c) 2021-2024, NVIDIA CORPORATION. + +from libcpp.memory cimport unique_ptr + +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type + + +cdef extern from "cudf/lists/explode.hpp" namespace "cudf" nogil: + cdef unique_ptr[table] explode_outer( + const table_view, + size_type explode_column_idx, + ) except + diff --git a/python/cudf/cudf/_lib/cpp/lists/extract.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/extract.pxd similarity index 56% rename from python/cudf/cudf/_lib/cpp/lists/extract.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/lists/extract.pxd index 93a886d7268..caa12f41914 100644 --- a/python/cudf/cudf/_lib/cpp/lists/extract.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/extract.pxd @@ -1,10 +1,12 @@ -# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column, column_view -from cudf._lib.cpp.lists.lists_column_view cimport lists_column_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column, column_view +from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( + lists_column_view, +) +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/lists/extract.hpp" namespace "cudf::lists" nogil: diff --git a/python/cudf/cudf/_lib/cpp/lists/gather.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/gather.pxd similarity index 57% rename from python/cudf/cudf/_lib/cpp/lists/gather.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/lists/gather.pxd index ea664eee82e..17b4c1877a6 100644 --- a/python/cudf/cudf/_lib/cpp/lists/gather.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/gather.pxd @@ -1,9 +1,11 @@ -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.lists.lists_column_view cimport lists_column_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( + lists_column_view, +) cdef extern from "cudf/lists/gather.hpp" namespace "cudf::lists" nogil: diff --git a/python/cudf/cudf/_lib/cpp/lists/lists_column_view.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/lists_column_view.pxd similarity index 69% rename from python/cudf/cudf/_lib/cpp/lists/lists_column_view.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/lists/lists_column_view.pxd index 793f4b8750d..dbafc415e45 100644 --- a/python/cudf/cudf/_lib/cpp/lists/lists_column_view.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/lists_column_view.pxd @@ -1,7 +1,10 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. -from cudf._lib.cpp.column.column_view cimport column_view, mutable_column_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( + column_view, + mutable_column_view, +) +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/lists/lists_column_view.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/lists/sorting.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/sorting.pxd similarity index 51% rename from python/cudf/cudf/_lib/cpp/lists/sorting.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/lists/sorting.pxd index 2115885ed95..145ab41302f 100644 --- a/python/cudf/cudf/_lib/cpp/lists/sorting.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/sorting.pxd @@ -1,10 +1,12 @@ -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.lists.lists_column_view cimport lists_column_view -from cudf._lib.cpp.types cimport null_order, order +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( + lists_column_view, +) +from cudf._lib.pylibcudf.libcudf.types cimport null_order, order cdef extern from "cudf/lists/sorting.hpp" namespace "cudf::lists" nogil: diff --git a/python/cudf/cudf/_lib/cpp/lists/stream_compaction.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/stream_compaction.pxd similarity index 52% rename from python/cudf/cudf/_lib/cpp/lists/stream_compaction.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/lists/stream_compaction.pxd index 58c1ab1dcec..22b91df7192 100644 --- a/python/cudf/cudf/_lib/cpp/lists/stream_compaction.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/stream_compaction.pxd @@ -1,10 +1,12 @@ -# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.lists.lists_column_view cimport lists_column_view -from cudf._lib.cpp.types cimport nan_equality, null_equality +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( + lists_column_view, +) +from cudf._lib.pylibcudf.libcudf.types cimport nan_equality, null_equality cdef extern from "cudf/lists/stream_compaction.hpp" \ diff --git a/python/cudf/cudf/_lib/cpp/merge.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/merge.pxd similarity index 62% rename from python/cudf/cudf/_lib/cpp/merge.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/merge.pxd index 32fe14ac479..dacb3dc2d74 100644 --- a/python/cudf/cudf/_lib/cpp/merge.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/merge.pxd @@ -1,11 +1,11 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector -cimport cudf._lib.cpp.types as libcudf_types -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view +cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/merge.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/null_mask.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/null_mask.pxd similarity index 76% rename from python/cudf/cudf/_lib/cpp/null_mask.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/null_mask.pxd index bd0eb684690..0cab404c05f 100644 --- a/python/cudf/cudf/_lib/cpp/null_mask.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/null_mask.pxd @@ -1,13 +1,17 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libc.stdint cimport int32_t from libcpp.pair cimport pair from rmm._lib.device_buffer cimport device_buffer -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport bitmask_type, mask_state, size_type +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport ( + bitmask_type, + mask_state, + size_type, +) ctypedef int32_t underlying_type_t_mask_state diff --git a/python/cudf/cudf/_lib/cpp/nvtext/__init__.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/nvtext/__init__.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/__init__.pxd diff --git a/python/cudf/cudf/_lib/cpp/nvtext/__init__.py b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/cpp/nvtext/__init__.py rename to python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/__init__.py diff --git a/python/cudf/cudf/_lib/cpp/nvtext/byte_pair_encode.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/byte_pair_encode.pxd similarity index 67% rename from python/cudf/cudf/_lib/cpp/nvtext/byte_pair_encode.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/byte_pair_encode.pxd index e678e4e84db..033a820d2ef 100644 --- a/python/cudf/cudf/_lib/cpp/nvtext/byte_pair_encode.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/byte_pair_encode.pxd @@ -1,11 +1,11 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.string cimport string -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar cdef extern from "nvtext/byte_pair_encoding.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/cpp/nvtext/edit_distance.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/edit_distance.pxd similarity index 67% rename from python/cudf/cudf/_lib/cpp/nvtext/edit_distance.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/edit_distance.pxd index 11de596ec8f..ca1f6650a5a 100644 --- a/python/cudf/cudf/_lib/cpp/nvtext/edit_distance.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/edit_distance.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp cimport bool from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "nvtext/edit_distance.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/cpp/nvtext/generate_ngrams.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/generate_ngrams.pxd similarity index 63% rename from python/cudf/cudf/_lib/cpp/nvtext/generate_ngrams.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/generate_ngrams.pxd index 75822054e4a..2034b1c1ee5 100644 --- a/python/cudf/cudf/_lib/cpp/nvtext/generate_ngrams.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/generate_ngrams.pxd @@ -1,11 +1,11 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "nvtext/generate_ngrams.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/cpp/nvtext/jaccard.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/jaccard.pxd similarity index 52% rename from python/cudf/cudf/_lib/cpp/nvtext/jaccard.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/jaccard.pxd index a77f95f07ac..789a1a2c35a 100644 --- a/python/cudf/cudf/_lib/cpp/nvtext/jaccard.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/jaccard.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "nvtext/jaccard.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/cpp/nvtext/minhash.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/minhash.pxd similarity index 63% rename from python/cudf/cudf/_lib/cpp/nvtext/minhash.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/minhash.pxd index 08b3330953e..fc5577bf3f9 100644 --- a/python/cudf/cudf/_lib/cpp/nvtext/minhash.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/minhash.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "nvtext/minhash.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/cpp/nvtext/ngrams_tokenize.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/ngrams_tokenize.pxd similarity index 50% rename from python/cudf/cudf/_lib/cpp/nvtext/ngrams_tokenize.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/ngrams_tokenize.pxd index d716df22546..229f4d8f5a3 100644 --- a/python/cudf/cudf/_lib/cpp/nvtext/ngrams_tokenize.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/ngrams_tokenize.pxd @@ -1,11 +1,11 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "nvtext/ngrams_tokenize.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/cpp/nvtext/normalize.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/normalize.pxd similarity index 66% rename from python/cudf/cudf/_lib/cpp/nvtext/normalize.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/normalize.pxd index f012670317a..65c63b089df 100644 --- a/python/cudf/cudf/_lib/cpp/nvtext/normalize.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/normalize.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp cimport bool from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "nvtext/normalize.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/cpp/nvtext/replace.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/replace.pxd similarity index 63% rename from python/cudf/cudf/_lib/cpp/nvtext/replace.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/replace.pxd index c4e5258a710..aaad28d2684 100644 --- a/python/cudf/cudf/_lib/cpp/nvtext/replace.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/replace.pxd @@ -1,11 +1,11 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "nvtext/replace.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/cpp/nvtext/stemmer.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/stemmer.pxd similarity index 74% rename from python/cudf/cudf/_lib/cpp/nvtext/stemmer.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/stemmer.pxd index 5a92b45b6dd..040d4c9de63 100644 --- a/python/cudf/cudf/_lib/cpp/nvtext/stemmer.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/stemmer.pxd @@ -1,11 +1,11 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "nvtext/stemmer.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/cpp/nvtext/subword_tokenize.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/subword_tokenize.pxd similarity index 89% rename from python/cudf/cudf/_lib/cpp/nvtext/subword_tokenize.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/subword_tokenize.pxd index 226fa613f2c..cce40bcd3f6 100644 --- a/python/cudf/cudf/_lib/cpp/nvtext/subword_tokenize.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/subword_tokenize.pxd @@ -1,12 +1,12 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libc.stdint cimport uint16_t, uint32_t from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.string cimport string -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "nvtext/subword_tokenize.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/cpp/nvtext/tokenize.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/tokenize.pxd similarity index 81% rename from python/cudf/cudf/_lib/cpp/nvtext/tokenize.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/tokenize.pxd index 3cc3fd6251a..721a6cabd01 100644 --- a/python/cudf/cudf/_lib/cpp/nvtext/tokenize.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/tokenize.pxd @@ -1,11 +1,11 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "nvtext/tokenize.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/cpp/partitioning.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/partitioning.pxd similarity index 64% rename from python/cudf/cudf/_lib/cpp/partitioning.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/partitioning.pxd index 5c58dbcc4ac..babb167d2a0 100644 --- a/python/cudf/cudf/_lib/cpp/partitioning.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/partitioning.pxd @@ -1,15 +1,15 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libc.stdint cimport uint32_t from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.vector cimport vector -cimport cudf._lib.cpp.types as libcudf_types -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view +cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/partitioning.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/quantiles.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/quantiles.pxd similarity index 65% rename from python/cudf/cudf/_lib/cpp/quantiles.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/quantiles.pxd index 03fda16856c..32cfec2d4fc 100644 --- a/python/cudf/cudf/_lib/cpp/quantiles.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/quantiles.pxd @@ -1,14 +1,14 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport ( interpolation, null_order, order, diff --git a/python/cudf/cudf/_lib/cpp/reduce.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/reduce.pxd similarity index 69% rename from python/cudf/cudf/_lib/cpp/reduce.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/reduce.pxd index 9c893fe9bcb..3ae1f1a2906 100644 --- a/python/cudf/cudf/_lib/cpp/reduce.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/reduce.pxd @@ -4,11 +4,14 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.utility cimport pair -from cudf._lib.cpp.aggregation cimport reduce_aggregation, scan_aggregation -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport scalar -from cudf._lib.cpp.types cimport data_type +from cudf._lib.pylibcudf.libcudf.aggregation cimport ( + reduce_aggregation, + scan_aggregation, +) +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/reduction.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/reduce.pyx b/python/cudf/cudf/_lib/pylibcudf/libcudf/reduce.pyx similarity index 100% rename from python/cudf/cudf/_lib/cpp/reduce.pyx rename to python/cudf/cudf/_lib/pylibcudf/libcudf/reduce.pyx diff --git a/python/cudf/cudf/_lib/cpp/replace.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/replace.pxd similarity index 85% rename from python/cudf/cudf/_lib/cpp/replace.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/replace.pxd index 5d57f01b816..e67efbdaba0 100644 --- a/python/cudf/cudf/_lib/cpp/replace.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/replace.pxd @@ -5,9 +5,12 @@ from libcpp.memory cimport unique_ptr from cudf._lib.types import cudf_to_np_types, np_to_cudf_types -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view, mutable_column_view -from cudf._lib.cpp.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( + column_view, + mutable_column_view, +) +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar cdef extern from "cudf/replace.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/replace.pyx b/python/cudf/cudf/_lib/pylibcudf/libcudf/replace.pyx similarity index 100% rename from python/cudf/cudf/_lib/cpp/replace.pyx rename to python/cudf/cudf/_lib/pylibcudf/libcudf/replace.pyx diff --git a/python/cudf/cudf/_lib/cpp/reshape.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/reshape.pxd similarity index 50% rename from python/cudf/cudf/_lib/cpp/reshape.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/reshape.pxd index 5b9d40aa2ad..dfd9a71c3d3 100644 --- a/python/cudf/cudf/_lib/cpp/reshape.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/reshape.pxd @@ -1,11 +1,11 @@ -# Copyright (c) 2019, NVIDIA CORPORATION. +# Copyright (c) 2019-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/reshape.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/rolling.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/rolling.pxd similarity index 71% rename from python/cudf/cudf/_lib/cpp/rolling.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/rolling.pxd index 6b620e3a4c0..d7844f99a73 100644 --- a/python/cudf/cudf/_lib/cpp/rolling.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/rolling.pxd @@ -4,10 +4,10 @@ from libcpp.memory cimport unique_ptr from cudf._lib.types import cudf_to_np_types, np_to_cudf_types -from cudf._lib.cpp.aggregation cimport rolling_aggregation -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.aggregation cimport rolling_aggregation +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/rolling.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/round.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/round.pxd similarity index 71% rename from python/cudf/cudf/_lib/cpp/round.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/round.pxd index 66d76c35d72..06ff42485ea 100644 --- a/python/cudf/cudf/_lib/cpp/round.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/round.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/round.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/scalar/__init__.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/scalar/__init__.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/__init__.pxd diff --git a/python/cudf/cudf/_lib/cpp/scalar/__init__.py b/python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/cpp/scalar/__init__.py rename to python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/__init__.py diff --git a/python/cudf/cudf/_lib/cpp/scalar/scalar.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/scalar.pxd similarity index 89% rename from python/cudf/cudf/_lib/cpp/scalar/scalar.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/scalar.pxd index b5e9b0ba06b..662eb90096e 100644 --- a/python/cudf/cudf/_lib/cpp/scalar/scalar.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/scalar.pxd @@ -1,13 +1,13 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libc.stdint cimport int32_t, int64_t from libcpp cimport bool from libcpp.string cimport string -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport data_type -from cudf._lib.cpp.wrappers.decimals cimport scale_type +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport data_type +from cudf._lib.pylibcudf.libcudf.wrappers.decimals cimport scale_type cdef extern from "cudf/scalar/scalar.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/search.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/search.pxd similarity index 69% rename from python/cudf/cudf/_lib/cpp/search.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/search.pxd index 8baef0aa1b9..e2247a1366f 100644 --- a/python/cudf/cudf/_lib/cpp/search.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/search.pxd @@ -1,12 +1,12 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector -cimport cudf._lib.cpp.types as libcudf_types -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.table.table_view cimport table_view +cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/search.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/sorting.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/sorting.pxd similarity index 86% rename from python/cudf/cudf/_lib/cpp/sorting.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/sorting.pxd index 86dc0f0de95..3d7d3aa2790 100644 --- a/python/cudf/cudf/_lib/cpp/sorting.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/sorting.pxd @@ -6,12 +6,12 @@ from libcpp.vector cimport vector from cudf._lib.types import cudf_to_np_types, np_to_cudf_types -cimport cudf._lib.cpp.types as libcudf_types -from cudf._lib.cpp.aggregation cimport rank_method -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view +cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types +from cudf._lib.pylibcudf.libcudf.aggregation cimport rank_method +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/sorting.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/stream_compaction.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/stream_compaction.pxd similarity index 88% rename from python/cudf/cudf/_lib/cpp/stream_compaction.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/stream_compaction.pxd index 55854a9444f..11d803e5b76 100644 --- a/python/cudf/cudf/_lib/cpp/stream_compaction.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/stream_compaction.pxd @@ -6,11 +6,11 @@ from libcpp.vector cimport vector from cudf._lib.types import cudf_to_np_types, np_to_cudf_types -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport ( nan_equality, nan_policy, null_equality, diff --git a/python/cudf/cudf/_lib/cpp/stream_compaction.pyx b/python/cudf/cudf/_lib/pylibcudf/libcudf/stream_compaction.pyx similarity index 100% rename from python/cudf/cudf/_lib/cpp/stream_compaction.pyx rename to python/cudf/cudf/_lib/pylibcudf/libcudf/stream_compaction.pyx diff --git a/python/cudf/cudf/_lib/cpp/strings/__init__.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/strings/__init__.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/__init__.pxd diff --git a/python/cudf/cudf/_lib/cpp/strings/__init__.py b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/cpp/strings/__init__.py rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/__init__.py diff --git a/python/cudf/cudf/_lib/cpp/strings/attributes.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/attributes.pxd similarity index 68% rename from python/cudf/cudf/_lib/cpp/strings/attributes.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/attributes.pxd index 31133b45b6d..c4d52c83663 100644 --- a/python/cudf/cudf/_lib/cpp/strings/attributes.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/attributes.pxd @@ -1,9 +1,9 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/strings/attributes.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/cpp/strings/capitalize.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/capitalize.pxd similarity index 67% rename from python/cudf/cudf/_lib/cpp/strings/capitalize.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/capitalize.pxd index d193a8265b1..f95d4f35566 100644 --- a/python/cudf/cudf/_lib/cpp/strings/capitalize.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/capitalize.pxd @@ -1,8 +1,8 @@ -# Copyright (c) 2020-2021, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/strings/capitalize.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/cpp/strings/case.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/case.pxd similarity index 67% rename from python/cudf/cudf/_lib/cpp/strings/case.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/case.pxd index 01cd08c10ff..9ccd2737afe 100644 --- a/python/cudf/cudf/_lib/cpp/strings/case.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/case.pxd @@ -1,8 +1,8 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/strings/case.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/cpp/strings/char_types.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/char_types.pxd similarity index 84% rename from python/cudf/cudf/_lib/cpp/strings/char_types.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/char_types.pxd index ae921c6ead9..408b3687c4a 100644 --- a/python/cudf/cudf/_lib/cpp/strings/char_types.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/char_types.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar cdef extern from "cudf/strings/char_types/char_types.hpp" \ diff --git a/python/cudf/cudf/_lib/cpp/strings/combine.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/combine.pxd similarity index 80% rename from python/cudf/cudf/_lib/cpp/strings/combine.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/combine.pxd index 2b10427283f..b05e46af0d6 100644 --- a/python/cudf/cudf/_lib/cpp/strings/combine.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/combine.pxd @@ -1,11 +1,11 @@ -# Copyright (c) 2020-2021, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/strings/combine.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/cpp/strings/contains.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/contains.pxd similarity index 64% rename from python/cudf/cudf/_lib/cpp/strings/contains.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/contains.pxd index 94c2fb21fc1..f8ed253ff3c 100644 --- a/python/cudf/cudf/_lib/cpp/strings/contains.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/contains.pxd @@ -1,11 +1,11 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.regex_program cimport regex_program +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program cdef extern from "cudf/strings/contains.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/cpp/strings/convert/__init__.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/strings/convert/__init__.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/__init__.pxd diff --git a/python/cudf/cudf/_lib/cpp/strings/convert/__init__.py b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/cpp/strings/convert/__init__.py rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/__init__.py diff --git a/python/cudf/cudf/_lib/cpp/strings/convert/convert_booleans.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_booleans.pxd similarity index 62% rename from python/cudf/cudf/_lib/cpp/strings/convert/convert_booleans.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_booleans.pxd index 96cb43973f1..daac2b5be28 100644 --- a/python/cudf/cudf/_lib/cpp/strings/convert/convert_booleans.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_booleans.pxd @@ -1,9 +1,9 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar cdef extern from "cudf/strings/convert/convert_booleans.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/cpp/strings/convert/convert_datetime.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_datetime.pxd similarity index 70% rename from python/cudf/cudf/_lib/cpp/strings/convert/convert_datetime.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_datetime.pxd index 5e7380c1d4e..263cee4fe1e 100644 --- a/python/cudf/cudf/_lib/cpp/strings/convert/convert_datetime.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_datetime.pxd @@ -1,11 +1,11 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.string cimport string -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.types cimport data_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/strings/convert/convert_datetime.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/cpp/strings/convert/convert_durations.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_durations.pxd similarity index 65% rename from python/cudf/cudf/_lib/cpp/strings/convert/convert_durations.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_durations.pxd index 8c54fd52aa2..af357b9bde4 100644 --- a/python/cudf/cudf/_lib/cpp/strings/convert/convert_durations.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_durations.pxd @@ -1,11 +1,11 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.string cimport string -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.types cimport data_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/strings/convert/convert_durations.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/cpp/strings/convert/convert_fixed_point.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_fixed_point.pxd similarity index 66% rename from python/cudf/cudf/_lib/cpp/strings/convert/convert_fixed_point.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_fixed_point.pxd index a993c5b17b8..91c1abdb5e4 100644 --- a/python/cudf/cudf/_lib/cpp/strings/convert/convert_fixed_point.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_fixed_point.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.types cimport data_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/strings/convert/convert_fixed_point.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/cpp/strings/convert/convert_floats.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_floats.pxd similarity index 64% rename from python/cudf/cudf/_lib/cpp/strings/convert/convert_floats.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_floats.pxd index 6388f43077d..5fbf2be0244 100644 --- a/python/cudf/cudf/_lib/cpp/strings/convert/convert_floats.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_floats.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.types cimport data_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/strings/convert/convert_floats.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/cpp/strings/convert/convert_integers.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_integers.pxd similarity index 75% rename from python/cudf/cudf/_lib/cpp/strings/convert/convert_integers.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_integers.pxd index b5443979b81..3d6c59cbfcf 100644 --- a/python/cudf/cudf/_lib/cpp/strings/convert/convert_integers.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_integers.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.types cimport data_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/strings/convert/convert_integers.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/cpp/strings/convert/convert_ipv4.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_ipv4.pxd similarity index 69% rename from python/cudf/cudf/_lib/cpp/strings/convert/convert_ipv4.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_ipv4.pxd index d6e881caea4..86de956b6b6 100644 --- a/python/cudf/cudf/_lib/cpp/strings/convert/convert_ipv4.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_ipv4.pxd @@ -1,9 +1,9 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/strings/convert/convert_ipv4.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/cpp/strings/convert/convert_lists.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_lists.pxd similarity index 53% rename from python/cudf/cudf/_lib/cpp/strings/convert/convert_lists.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_lists.pxd index 99bb80a813d..aba2dbcca64 100644 --- a/python/cudf/cudf/_lib/cpp/strings/convert/convert_lists.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_lists.pxd @@ -1,9 +1,9 @@ -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar cdef extern from "cudf/strings/convert/convert_lists.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/cpp/strings/convert/convert_urls.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_urls.pxd similarity index 62% rename from python/cudf/cudf/_lib/cpp/strings/convert/convert_urls.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_urls.pxd index 5d9991dd610..fb7e0cae6de 100644 --- a/python/cudf/cudf/_lib/cpp/strings/convert/convert_urls.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_urls.pxd @@ -1,9 +1,9 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/strings/convert/convert_urls.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/extract.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/extract.pxd new file mode 100644 index 00000000000..57903ca27de --- /dev/null +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/extract.pxd @@ -0,0 +1,15 @@ +# Copyright (c) 2020-2024, NVIDIA CORPORATION. + +from libcpp.memory cimport unique_ptr + +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program +from cudf._lib.pylibcudf.libcudf.table.table cimport table + + +cdef extern from "cudf/strings/extract.hpp" namespace "cudf::strings" nogil: + + cdef unique_ptr[table] extract( + column_view source_strings, + regex_program) except + diff --git a/python/cudf/cudf/_lib/cpp/strings/find.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/find.pxd similarity index 83% rename from python/cudf/cudf/_lib/cpp/strings/find.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/find.pxd index dfbdebb9651..04e2ed554ee 100644 --- a/python/cudf/cudf/_lib/cpp/strings/find.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/find.pxd @@ -3,10 +3,10 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/find.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/cpp/strings/find_multiple.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/find_multiple.pxd similarity index 58% rename from python/cudf/cudf/_lib/cpp/strings/find_multiple.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/find_multiple.pxd index 27b19728f60..1f1adc8e99f 100644 --- a/python/cudf/cudf/_lib/cpp/strings/find_multiple.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/find_multiple.pxd @@ -1,9 +1,9 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/strings/find_multiple.hpp" namespace "cudf::strings" \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/findall.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/findall.pxd new file mode 100644 index 00000000000..4bc450b8911 --- /dev/null +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/findall.pxd @@ -0,0 +1,14 @@ +# Copyright (c) 2019-2024, NVIDIA CORPORATION. + +from libcpp.memory cimport unique_ptr + +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program + + +cdef extern from "cudf/strings/findall.hpp" namespace "cudf::strings" nogil: + + cdef unique_ptr[column] findall( + column_view source_strings, + regex_program) except + diff --git a/python/cudf/cudf/_lib/cpp/strings/json.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/json.pxd similarity index 75% rename from python/cudf/cudf/_lib/cpp/strings/json.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/json.pxd index eed627c96b5..5926fa1d29f 100644 --- a/python/cudf/cudf/_lib/cpp/strings/json.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/json.pxd @@ -1,12 +1,12 @@ -# Copyright (c) 2021-2023, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.string cimport string -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport scalar, string_scalar +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar, string_scalar cdef extern from "cudf/json/json.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/strings/padding.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/padding.pxd similarity index 54% rename from python/cudf/cudf/_lib/cpp/strings/padding.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/padding.pxd index c3906a5b4c6..26681a1aa00 100644 --- a/python/cudf/cudf/_lib/cpp/strings/padding.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/padding.pxd @@ -1,13 +1,13 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr from libcpp.string cimport string -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.side_type cimport side_type -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.side_type cimport side_type +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/padding.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/cpp/strings/regex_flags.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/regex_flags.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/strings/regex_flags.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/regex_flags.pxd diff --git a/python/cudf/cudf/_lib/cpp/strings/regex_program.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/regex_program.pxd similarity index 74% rename from python/cudf/cudf/_lib/cpp/strings/regex_program.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/regex_program.pxd index 7818c9c7d01..e92c8bd7737 100644 --- a/python/cudf/cudf/_lib/cpp/strings/regex_program.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/regex_program.pxd @@ -1,9 +1,9 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.string cimport string -from cudf._lib.cpp.strings.regex_flags cimport regex_flags +from cudf._lib.pylibcudf.libcudf.strings.regex_flags cimport regex_flags cdef extern from "cudf/strings/regex/regex_program.hpp" \ diff --git a/python/cudf/cudf/_lib/cpp/strings/repeat.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/repeat.pxd similarity index 60% rename from python/cudf/cudf/_lib/cpp/strings/repeat.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/repeat.pxd index 2a6754b9a11..9e128529406 100644 --- a/python/cudf/cudf/_lib/cpp/strings/repeat.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/repeat.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2021, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/repeat_strings.hpp" namespace "cudf::strings" \ diff --git a/python/cudf/cudf/_lib/cpp/strings/replace.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/replace.pxd similarity index 68% rename from python/cudf/cudf/_lib/cpp/strings/replace.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/replace.pxd index 2a9c6913bb3..92e142b33fc 100644 --- a/python/cudf/cudf/_lib/cpp/strings/replace.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/replace.pxd @@ -1,13 +1,13 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr from libcpp.string cimport string -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/replace.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/cpp/strings/replace_re.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/replace_re.pxd similarity index 59% rename from python/cudf/cudf/_lib/cpp/strings/replace_re.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/replace_re.pxd index 94f3d0528a5..739505cd51d 100644 --- a/python/cudf/cudf/_lib/cpp/strings/replace_re.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/replace_re.pxd @@ -1,15 +1,15 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.regex_program cimport regex_program -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/replace_re.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/cpp/strings/side_type.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/side_type.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/strings/side_type.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/side_type.pxd diff --git a/python/cudf/cudf/_lib/cpp/strings/split/__init__.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/strings/split/__init__.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/__init__.pxd diff --git a/python/cudf/cudf/_lib/cpp/strings/split/__init__.py b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/cpp/strings/split/__init__.py rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/__init__.py diff --git a/python/cudf/cudf/_lib/cpp/strings/split/partition.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/partition.pxd similarity index 56% rename from python/cudf/cudf/_lib/cpp/strings/split/partition.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/partition.pxd index fb83512e9f0..5119124b3e3 100644 --- a/python/cudf/cudf/_lib/cpp/strings/split/partition.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/partition.pxd @@ -1,12 +1,12 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.string cimport string -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.table.table cimport table +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.table.table cimport table cdef extern from "cudf/strings/split/partition.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/cpp/strings/split/split.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/split.pxd similarity index 76% rename from python/cudf/cudf/_lib/cpp/strings/split/split.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/split.pxd index d6207cd5c76..4f75664e47a 100644 --- a/python/cudf/cudf/_lib/cpp/strings/split/split.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/split.pxd @@ -1,14 +1,14 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.string cimport string -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.regex_program cimport regex_program -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/split/split.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/strip.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/strip.pxd new file mode 100644 index 00000000000..2d6fd6a9e89 --- /dev/null +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/strip.pxd @@ -0,0 +1,16 @@ +# Copyright (c) 2020-2024, NVIDIA CORPORATION. + +from libcpp.memory cimport unique_ptr + +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.side_type cimport side_type + + +cdef extern from "cudf/strings/strip.hpp" namespace "cudf::strings" nogil: + + cdef unique_ptr[column] strip( + column_view source_strings, + side_type stype, + string_scalar to_strip) except + diff --git a/python/cudf/cudf/_lib/cpp/strings/substring.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/substring.pxd similarity index 60% rename from python/cudf/cudf/_lib/cpp/strings/substring.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/substring.pxd index 99ea8c7ff3f..02123cc0807 100644 --- a/python/cudf/cudf/_lib/cpp/strings/substring.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/substring.pxd @@ -1,11 +1,11 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport numeric_scalar -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport numeric_scalar +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/slice.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/cpp/strings/translate.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/translate.pxd similarity index 69% rename from python/cudf/cudf/_lib/cpp/strings/translate.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings/translate.pxd index 3239ba314e4..b23ac277216 100644 --- a/python/cudf/cudf/_lib/cpp/strings/translate.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/translate.pxd @@ -1,14 +1,14 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.vector cimport vector -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.types cimport char_utf8 +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.types cimport char_utf8 cdef extern from "cudf/strings/translate.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/wrap.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/wrap.pxd new file mode 100644 index 00000000000..1d92d445634 --- /dev/null +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/wrap.pxd @@ -0,0 +1,14 @@ +# Copyright (c) 2020-2024, NVIDIA CORPORATION. + +from libcpp.memory cimport unique_ptr + +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type + + +cdef extern from "cudf/strings/wrap.hpp" namespace "cudf::strings" nogil: + + cdef unique_ptr[column] wrap( + column_view source_strings, + size_type width) except + diff --git a/python/cudf/cudf/_lib/cpp/strings_udf.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings_udf.pxd similarity index 81% rename from python/cudf/cudf/_lib/cpp/strings_udf.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/strings_udf.pxd index 7d45bc858f5..b895d5e6925 100644 --- a/python/cudf/cudf/_lib/cpp/strings_udf.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings_udf.pxd @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. from libc.stdint cimport uint8_t, uint16_t from libcpp.memory cimport unique_ptr @@ -7,9 +7,9 @@ from libcpp.vector cimport vector from rmm._lib.device_buffer cimport DeviceBuffer, device_buffer -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/udf/udf_string.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/cpp/table/__init__.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/table/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/table/__init__.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/table/__init__.pxd diff --git a/python/cudf/cudf/_lib/cpp/table/__init__.py b/python/cudf/cudf/_lib/pylibcudf/libcudf/table/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/cpp/table/__init__.py rename to python/cudf/cudf/_lib/pylibcudf/libcudf/table/__init__.py diff --git a/python/cudf/cudf/_lib/cpp/table/table.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/table/table.pxd similarity index 62% rename from python/cudf/cudf/_lib/cpp/table/table.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/table/table.pxd index ac93e3def19..737a1327d45 100644 --- a/python/cudf/cudf/_lib/cpp/table/table.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/table/table.pxd @@ -1,11 +1,14 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.table.table_view cimport mutable_table_view, table_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.table.table_view cimport ( + mutable_table_view, + table_view, +) +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/table/table.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/table/table_view.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/table/table_view.pxd similarity index 77% rename from python/cudf/cudf/_lib/cpp/table/table_view.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/table/table_view.pxd index 728b6d2be4b..00e1a89c025 100644 --- a/python/cudf/cudf/_lib/cpp/table/table_view.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/table/table_view.pxd @@ -1,9 +1,12 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.vector cimport vector -from cudf._lib.cpp.column.column_view cimport column_view, mutable_column_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( + column_view, + mutable_column_view, +) +from cudf._lib.pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/table/table_view.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/transform.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/transform.pxd similarity index 70% rename from python/cudf/cudf/_lib/cpp/transform.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/transform.pxd index d9de04b676e..b0a978fe5c5 100644 --- a/python/cudf/cudf/_lib/cpp/transform.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/transform.pxd @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp cimport bool from libcpp.memory cimport unique_ptr @@ -7,12 +7,16 @@ from libcpp.string cimport string from rmm._lib.device_buffer cimport device_buffer -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.expressions cimport expression -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport bitmask_type, data_type, size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.expressions cimport expression +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport ( + bitmask_type, + data_type, + size_type, +) cdef extern from "cudf/transform.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/transpose.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/transpose.pxd similarity index 59% rename from python/cudf/cudf/_lib/cpp/transpose.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/transpose.pxd index 8cbfb0055bd..5dcb9c165ad 100644 --- a/python/cudf/cudf/_lib/cpp/transpose.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/transpose.pxd @@ -1,10 +1,10 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/transpose.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/types.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/types.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/types.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/types.pxd diff --git a/python/cudf/cudf/_lib/cpp/types.pyx b/python/cudf/cudf/_lib/pylibcudf/libcudf/types.pyx similarity index 100% rename from python/cudf/cudf/_lib/cpp/types.pyx rename to python/cudf/cudf/_lib/pylibcudf/libcudf/types.pyx diff --git a/python/cudf/cudf/_lib/cpp/unary.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/unary.pxd similarity index 84% rename from python/cudf/cudf/_lib/cpp/unary.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/unary.pxd index cc07290b6c4..7f8ae2b7617 100644 --- a/python/cudf/cudf/_lib/cpp/unary.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/unary.pxd @@ -3,9 +3,9 @@ from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.types cimport data_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/unary.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/cpp/unary.pyx b/python/cudf/cudf/_lib/pylibcudf/libcudf/unary.pyx similarity index 100% rename from python/cudf/cudf/_lib/cpp/unary.pyx rename to python/cudf/cudf/_lib/pylibcudf/libcudf/unary.pyx diff --git a/python/cudf/cudf/_lib/cpp/utilities/__init__.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/utilities/__init__.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/__init__.pxd diff --git a/python/cudf/cudf/_lib/cpp/utilities/__init__.py b/python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/cpp/utilities/__init__.py rename to python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/__init__.py diff --git a/python/cudf/cudf/_lib/cpp/utilities/host_span.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/host_span.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/utilities/host_span.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/host_span.pxd diff --git a/python/cudf/cudf/_lib/cpp/wrappers/__init__.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/wrappers/__init__.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/__init__.pxd diff --git a/python/cudf/cudf/_lib/cpp/wrappers/__init__.py b/python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/cpp/wrappers/__init__.py rename to python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/__init__.py diff --git a/python/cudf/cudf/_lib/cpp/wrappers/decimals.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/decimals.pxd similarity index 82% rename from python/cudf/cudf/_lib/cpp/wrappers/decimals.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/decimals.pxd index 858569fd696..09b0c87e4b8 100644 --- a/python/cudf/cudf/_lib/cpp/wrappers/decimals.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/decimals.pxd @@ -1,8 +1,8 @@ -# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libc.stdint cimport int32_t, int64_t -from cudf._lib.cpp.types cimport int128 +from cudf._lib.pylibcudf.libcudf.types cimport int128 cdef extern from "cudf/fixed_point/fixed_point.hpp" namespace "numeric" nogil: diff --git a/python/cudf/cudf/_lib/cpp/wrappers/durations.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/durations.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/wrappers/durations.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/durations.pxd diff --git a/python/cudf/cudf/_lib/cpp/wrappers/timestamps.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/timestamps.pxd similarity index 100% rename from python/cudf/cudf/_lib/cpp/wrappers/timestamps.pxd rename to python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/timestamps.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/lists.pxd b/python/cudf/cudf/_lib/pylibcudf/lists.pxd index cf96dfcb81e..b780d299977 100644 --- a/python/cudf/cudf/_lib/pylibcudf/lists.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/lists.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.types cimport size_type from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/lists.pyx b/python/cudf/cudf/_lib/pylibcudf/lists.pyx index faeca56286e..654f39742b6 100644 --- a/python/cudf/cudf/_lib/pylibcudf/lists.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/lists.pyx @@ -3,9 +3,9 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.cpp.lists cimport explode as cpp_explode -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.lists cimport explode as cpp_explode +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.types cimport size_type from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/merge.pyx b/python/cudf/cudf/_lib/pylibcudf/merge.pyx index 91b2b0ea65b..5aa46c142f6 100644 --- a/python/cudf/cudf/_lib/pylibcudf/merge.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/merge.pyx @@ -4,10 +4,10 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector -from cudf._lib.cpp cimport merge as cpp_merge -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport null_order, order, size_type +from cudf._lib.pylibcudf.libcudf cimport merge as cpp_merge +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport null_order, order, size_type from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/reduce.pxd b/python/cudf/cudf/_lib/pylibcudf/reduce.pxd index a613e877ce2..935efd4acf2 100644 --- a/python/cudf/cudf/_lib/pylibcudf/reduce.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/reduce.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.cpp.reduce cimport scan_type +from cudf._lib.pylibcudf.libcudf.reduce cimport scan_type from .aggregation cimport Aggregation from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/reduce.pyx b/python/cudf/cudf/_lib/pylibcudf/reduce.pyx index d12da712fcf..c272f183007 100644 --- a/python/cudf/cudf/_lib/pylibcudf/reduce.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/reduce.pyx @@ -4,18 +4,22 @@ from cython.operator cimport dereference from libcpp.memory cimport unique_ptr from libcpp.utility cimport move, pair -from cudf._lib.cpp cimport reduce as cpp_reduce -from cudf._lib.cpp.aggregation cimport reduce_aggregation, scan_aggregation -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.reduce cimport scan_type -from cudf._lib.cpp.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf cimport reduce as cpp_reduce +from cudf._lib.pylibcudf.libcudf.aggregation cimport ( + reduce_aggregation, + scan_aggregation, +) +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.reduce cimport scan_type +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar from .aggregation cimport Aggregation from .column cimport Column from .scalar cimport Scalar from .types cimport DataType -from cudf._lib.cpp.reduce import scan_type as ScanType # no-cython-lint +from cudf._lib.pylibcudf.libcudf.reduce import \ + scan_type as ScanType # no-cython-lint cpdef Scalar reduce(Column col, Aggregation agg, DataType data_type): diff --git a/python/cudf/cudf/_lib/pylibcudf/replace.pxd b/python/cudf/cudf/_lib/pylibcudf/replace.pxd index fc42b985c8e..40484c728db 100644 --- a/python/cudf/cudf/_lib/pylibcudf/replace.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/replace.pxd @@ -2,7 +2,7 @@ from libcpp cimport bool -from cudf._lib.cpp.replace cimport replace_policy +from cudf._lib.pylibcudf.libcudf.replace cimport replace_policy from .column cimport Column from .scalar cimport Scalar diff --git a/python/cudf/cudf/_lib/pylibcudf/replace.pyx b/python/cudf/cudf/_lib/pylibcudf/replace.pyx index dd3a733ee3a..6e08e8f64a9 100644 --- a/python/cudf/cudf/_lib/pylibcudf/replace.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/replace.pyx @@ -7,10 +7,10 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.cpp cimport replace as cpp_replace -from cudf._lib.cpp.column.column cimport column +from cudf._lib.pylibcudf.libcudf cimport replace as cpp_replace +from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.cpp.replace import \ +from cudf._lib.pylibcudf.libcudf.replace import \ replace_policy as ReplacePolicy # no-cython-lint from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/rolling.pxd b/python/cudf/cudf/_lib/pylibcudf/rolling.pxd index 88d683c0c35..cdadee68d43 100644 --- a/python/cudf/cudf/_lib/pylibcudf/rolling.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/rolling.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.types cimport size_type from .aggregation cimport Aggregation from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/rolling.pyx b/python/cudf/cudf/_lib/pylibcudf/rolling.pyx index 8a1d83911ca..7aa7828a5dd 100644 --- a/python/cudf/cudf/_lib/pylibcudf/rolling.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/rolling.pyx @@ -4,10 +4,10 @@ from cython.operator cimport dereference from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.cpp cimport rolling as cpp_rolling -from cudf._lib.cpp.aggregation cimport rolling_aggregation -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf cimport rolling as cpp_rolling +from cudf._lib.pylibcudf.libcudf.aggregation cimport rolling_aggregation +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.types cimport size_type from .aggregation cimport Aggregation from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/scalar.pxd b/python/cudf/cudf/_lib/pylibcudf/scalar.pxd index 85744eca902..3de86d93519 100644 --- a/python/cudf/cudf/_lib/pylibcudf/scalar.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/scalar.pxd @@ -5,7 +5,7 @@ from libcpp.memory cimport unique_ptr from rmm._lib.memory_resource cimport DeviceMemoryResource -from cudf._lib.cpp.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar from .types cimport DataType diff --git a/python/cudf/cudf/_lib/pylibcudf/scalar.pyx b/python/cudf/cudf/_lib/pylibcudf/scalar.pyx index 4a2d8f393bd..6799c37cea2 100644 --- a/python/cudf/cudf/_lib/pylibcudf/scalar.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/scalar.pyx @@ -5,7 +5,7 @@ from libcpp.memory cimport unique_ptr from rmm._lib.memory_resource cimport get_current_device_resource -from cudf._lib.cpp.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar from .types cimport DataType diff --git a/python/cudf/cudf/_lib/pylibcudf/search.pyx b/python/cudf/cudf/_lib/pylibcudf/search.pyx index a186167af13..151a39f204f 100644 --- a/python/cudf/cudf/_lib/pylibcudf/search.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/search.pyx @@ -4,9 +4,9 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector -from cudf._lib.cpp cimport search as cpp_search -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.types cimport null_order, order +from cudf._lib.pylibcudf.libcudf cimport search as cpp_search +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.types cimport null_order, order from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/sorting.pxd b/python/cudf/cudf/_lib/pylibcudf/sorting.pxd index 3ed241622c0..a4ea541a03b 100644 --- a/python/cudf/cudf/_lib/pylibcudf/sorting.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/sorting.pxd @@ -2,8 +2,13 @@ from libcpp cimport bool -from cudf._lib.cpp.aggregation cimport rank_method -from cudf._lib.cpp.types cimport null_order, null_policy, order, size_type +from cudf._lib.pylibcudf.libcudf.aggregation cimport rank_method +from cudf._lib.pylibcudf.libcudf.types cimport ( + null_order, + null_policy, + order, + size_type, +) from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/sorting.pyx b/python/cudf/cudf/_lib/pylibcudf/sorting.pyx index 1668a3efc7c..8c5a8e26899 100644 --- a/python/cudf/cudf/_lib/pylibcudf/sorting.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/sorting.pyx @@ -4,11 +4,11 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector -from cudf._lib.cpp cimport sorting as cpp_sorting -from cudf._lib.cpp.aggregation cimport rank_method -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.types cimport null_order, null_policy, order +from cudf._lib.pylibcudf.libcudf cimport sorting as cpp_sorting +from cudf._lib.pylibcudf.libcudf.aggregation cimport rank_method +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.types cimport null_order, null_policy, order from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/stream_compaction.pxd b/python/cudf/cudf/_lib/pylibcudf/stream_compaction.pxd index 29acc21fc05..6f89aaf90e7 100644 --- a/python/cudf/cudf/_lib/pylibcudf/stream_compaction.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/stream_compaction.pxd @@ -1,7 +1,9 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.cpp.stream_compaction cimport duplicate_keep_option -from cudf._lib.cpp.types cimport ( +from cudf._lib.pylibcudf.libcudf.stream_compaction cimport ( + duplicate_keep_option, +) +from cudf._lib.pylibcudf.libcudf.types cimport ( nan_equality, nan_policy, null_equality, diff --git a/python/cudf/cudf/_lib/pylibcudf/stream_compaction.pyx b/python/cudf/cudf/_lib/pylibcudf/stream_compaction.pyx index af7a85d31bf..43449d3690a 100644 --- a/python/cudf/cudf/_lib/pylibcudf/stream_compaction.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/stream_compaction.pyx @@ -4,11 +4,15 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector -from cudf._lib.cpp cimport stream_compaction as cpp_stream_compaction -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.stream_compaction cimport duplicate_keep_option -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.types cimport ( +from cudf._lib.pylibcudf.libcudf cimport ( + stream_compaction as cpp_stream_compaction, +) +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.stream_compaction cimport ( + duplicate_keep_option, +) +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.types cimport ( nan_equality, nan_policy, null_equality, @@ -16,7 +20,7 @@ from cudf._lib.cpp.types cimport ( size_type, ) -from cudf._lib.cpp.stream_compaction import \ +from cudf._lib.pylibcudf.libcudf.stream_compaction import \ duplicate_keep_option as DuplicateKeepOption # no-cython-lint, isort:skip from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/case.pyx b/python/cudf/cudf/_lib/pylibcudf/strings/case.pyx index 69910fd8c50..3a360fd6b10 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/case.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/strings/case.pyx @@ -3,9 +3,9 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.strings cimport case as cpp_case from cudf._lib.pylibcudf.column cimport Column +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.strings cimport case as cpp_case cpdef Column to_lower(Column input): diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/find.pxd b/python/cudf/cudf/_lib/pylibcudf/strings/find.pxd index 22e933106c7..bb43069f190 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/find.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/strings/find.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.cpp.types cimport size_type from cudf._lib.pylibcudf.column cimport Column +from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.pylibcudf.scalar cimport Scalar ctypedef fused ColumnOrScalar: diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/find.pyx b/python/cudf/cudf/_lib/pylibcudf/strings/find.pyx index 1d94132a8b3..a0214efd0a1 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/find.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/strings/find.pyx @@ -2,14 +2,14 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.strings cimport find as cpp_find from cudf._lib.pylibcudf.column cimport Column +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.strings cimport find as cpp_find from cudf._lib.pylibcudf.scalar cimport Scalar from cython.operator import dereference -from cudf._lib.cpp.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar cpdef Column find( diff --git a/python/cudf/cudf/_lib/pylibcudf/table.pxd b/python/cudf/cudf/_lib/pylibcudf/table.pxd index 7467bfccaa8..e476fc770e3 100644 --- a/python/cudf/cudf/_lib/pylibcudf/table.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/table.pxd @@ -2,8 +2,8 @@ from libcpp.memory cimport unique_ptr -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view cdef class Table: diff --git a/python/cudf/cudf/_lib/pylibcudf/table.pyx b/python/cudf/cudf/_lib/pylibcudf/table.pyx index 1fa60ec2b6c..d93ac78721b 100644 --- a/python/cudf/cudf/_lib/pylibcudf/table.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/table.pyx @@ -5,9 +5,9 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.table.table cimport table +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.table.table cimport table from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/types.pxd b/python/cudf/cudf/_lib/pylibcudf/types.pxd index 6c53636d332..e54a259819e 100644 --- a/python/cudf/cudf/_lib/pylibcudf/types.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/types.pxd @@ -3,7 +3,7 @@ from libc.stdint cimport int32_t from libcpp cimport bool as cbool -from cudf._lib.cpp.types cimport ( +from cudf._lib.pylibcudf.libcudf.types cimport ( data_type, interpolation, mask_state, diff --git a/python/cudf/cudf/_lib/pylibcudf/types.pyx b/python/cudf/cudf/_lib/pylibcudf/types.pyx index baf92223714..ebe4d66fa20 100644 --- a/python/cudf/cudf/_lib/pylibcudf/types.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/types.pyx @@ -2,17 +2,17 @@ from libc.stdint cimport int32_t -from cudf._lib.cpp.types cimport data_type, type_id +from cudf._lib.pylibcudf.libcudf.types cimport data_type, type_id -from cudf._lib.cpp.types import type_id as TypeId # no-cython-lint, isort:skip -from cudf._lib.cpp.types import nan_policy as NanPolicy # no-cython-lint, isort:skip -from cudf._lib.cpp.types import null_policy as NullPolicy # no-cython-lint, isort:skip -from cudf._lib.cpp.types import interpolation as Interpolation # no-cython-lint, isort:skip -from cudf._lib.cpp.types import nan_equality as NanEquality # no-cython-lint, isort:skip -from cudf._lib.cpp.types import null_equality as NullEquality # no-cython-lint, isort:skip -from cudf._lib.cpp.types import null_order as NullOrder # no-cython-lint, isort:skip -from cudf._lib.cpp.types import order as Order # no-cython-lint, isort:skip -from cudf._lib.cpp.types import sorted as Sorted # no-cython-lint, isort:skip +from cudf._lib.pylibcudf.libcudf.types import type_id as TypeId # no-cython-lint, isort:skip +from cudf._lib.pylibcudf.libcudf.types import nan_policy as NanPolicy # no-cython-lint, isort:skip +from cudf._lib.pylibcudf.libcudf.types import null_policy as NullPolicy # no-cython-lint, isort:skip +from cudf._lib.pylibcudf.libcudf.types import interpolation as Interpolation # no-cython-lint, isort:skip +from cudf._lib.pylibcudf.libcudf.types import nan_equality as NanEquality # no-cython-lint, isort:skip +from cudf._lib.pylibcudf.libcudf.types import null_equality as NullEquality # no-cython-lint, isort:skip +from cudf._lib.pylibcudf.libcudf.types import null_order as NullOrder # no-cython-lint, isort:skip +from cudf._lib.pylibcudf.libcudf.types import order as Order # no-cython-lint, isort:skip +from cudf._lib.pylibcudf.libcudf.types import sorted as Sorted # no-cython-lint, isort:skip cdef class DataType: diff --git a/python/cudf/cudf/_lib/pylibcudf/unary.pxd b/python/cudf/cudf/_lib/pylibcudf/unary.pxd index b4372db4ae2..4aa4543bb80 100644 --- a/python/cudf/cudf/_lib/pylibcudf/unary.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/unary.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.cpp.unary cimport unary_operator +from cudf._lib.pylibcudf.libcudf.unary cimport unary_operator from .column cimport Column from .types cimport DataType diff --git a/python/cudf/cudf/_lib/pylibcudf/unary.pyx b/python/cudf/cudf/_lib/pylibcudf/unary.pyx index 437dd313e85..0879b501a49 100644 --- a/python/cudf/cudf/_lib/pylibcudf/unary.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/unary.pyx @@ -3,11 +3,11 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.cpp cimport unary as cpp_unary -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.unary cimport unary_operator +from cudf._lib.pylibcudf.libcudf cimport unary as cpp_unary +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.unary cimport unary_operator -from cudf._lib.cpp.unary import \ +from cudf._lib.pylibcudf.libcudf.unary import \ unary_operator as UnaryOperator # no-cython-lint from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/utils.pxd b/python/cudf/cudf/_lib/pylibcudf/utils.pxd index 7efeaaf7e24..77c05086397 100644 --- a/python/cudf/cudf/_lib/pylibcudf/utils.pxd +++ b/python/cudf/cudf/_lib/pylibcudf/utils.pxd @@ -3,8 +3,8 @@ from libcpp.functional cimport reference_wrapper from libcpp.vector cimport vector -from cudf._lib.cpp.scalar.scalar cimport scalar -from cudf._lib.cpp.types cimport bitmask_type +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.types cimport bitmask_type cdef void * int_to_void_ptr(Py_ssize_t ptr) nogil diff --git a/python/cudf/cudf/_lib/pylibcudf/utils.pyx b/python/cudf/cudf/_lib/pylibcudf/utils.pyx index ea34a87a72a..b4427e8ecff 100644 --- a/python/cudf/cudf/_lib/pylibcudf/utils.pyx +++ b/python/cudf/cudf/_lib/pylibcudf/utils.pyx @@ -6,8 +6,8 @@ from libc.stdint cimport uintptr_t from libcpp.functional cimport reference_wrapper from libcpp.vector cimport vector -from cudf._lib.cpp.scalar.scalar cimport scalar -from cudf._lib.cpp.types cimport bitmask_type +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.types cimport bitmask_type from .scalar cimport Scalar diff --git a/python/cudf/cudf/_lib/quantiles.pyx b/python/cudf/cudf/_lib/quantiles.pyx index d3a02fa7cbf..3d20454a7ce 100644 --- a/python/cudf/cudf/_lib/quantiles.pyx +++ b/python/cudf/cudf/_lib/quantiles.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -17,15 +17,20 @@ from cudf._lib.types cimport ( from cudf._lib.types import Interpolation -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.quantiles cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.quantiles cimport ( quantile as cpp_quantile, quantiles as cpp_quantile_table, ) -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport interpolation, null_order, order, sorted +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport ( + interpolation, + null_order, + order, + sorted, +) from cudf._lib.utils cimport columns_from_unique_ptr, table_view_from_columns diff --git a/python/cudf/cudf/_lib/reshape.pyx b/python/cudf/cudf/_lib/reshape.pyx index c237b7b1389..48e386bcf02 100644 --- a/python/cudf/cudf/_lib/reshape.pyx +++ b/python/cudf/cudf/_lib/reshape.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2022, NVIDIA CORPORATION. +# Copyright (c) 2019-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -6,14 +6,14 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.reshape cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.reshape cimport ( interleave_columns as cpp_interleave_columns, tile as cpp_tile, ) -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.utils cimport columns_from_unique_ptr, table_view_from_columns diff --git a/python/cudf/cudf/_lib/round.pyx b/python/cudf/cudf/_lib/round.pyx index 7eddb1b8cbd..c1c36dd8854 100644 --- a/python/cudf/cudf/_lib/round.pyx +++ b/python/cudf/cudf/_lib/round.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -6,9 +6,9 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.round cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.round cimport ( round as cpp_round, rounding_method as cpp_rounding_method, ) diff --git a/python/cudf/cudf/_lib/scalar.pxd b/python/cudf/cudf/_lib/scalar.pxd index 154ee22e796..b57acbb37f1 100644 --- a/python/cudf/cudf/_lib/scalar.pxd +++ b/python/cudf/cudf/_lib/scalar.pxd @@ -5,7 +5,7 @@ from libcpp.memory cimport unique_ptr from rmm._lib.memory_resource cimport DeviceMemoryResource -from cudf._lib.cpp.scalar.scalar cimport scalar +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar cdef class DeviceScalar: diff --git a/python/cudf/cudf/_lib/scalar.pyx b/python/cudf/cudf/_lib/scalar.pyx index aee496e9f1c..e68398498d1 100644 --- a/python/cudf/cudf/_lib/scalar.pyx +++ b/python/cudf/cudf/_lib/scalar.pyx @@ -17,27 +17,27 @@ from cudf._lib.types import LIBCUDF_TO_SUPPORTED_NUMPY_TYPES from cudf.core.dtypes import ListDtype, StructDtype from cudf.core.missing import NA, NaT -cimport cudf._lib.cpp.types as libcudf_types +cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types # We currently need this cimport because some of the implementations here # access the c_obj of the scalar, and because we need to be able to call # pylibcudf.Scalar.from_libcudf. Both of those are temporarily acceptable until # DeviceScalar is phased out entirely from cuDF Cython (at which point # cudf.Scalar will be directly backed by pylibcudf.Scalar). -from cudf._lib cimport pylibcudf -from cudf._lib.cpp.scalar.scalar cimport ( +from cudf._lib.pylibcudf cimport Scalar as plc_Scalar +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport ( duration_scalar, list_scalar, scalar, struct_scalar, timestamp_scalar, ) -from cudf._lib.cpp.wrappers.durations cimport ( +from cudf._lib.pylibcudf.libcudf.wrappers.durations cimport ( duration_ms, duration_ns, duration_s, duration_us, ) -from cudf._lib.cpp.wrappers.timestamps cimport ( +from cudf._lib.pylibcudf.libcudf.wrappers.timestamps cimport ( timestamp_ms, timestamp_ns, timestamp_s, @@ -206,7 +206,7 @@ cdef class DeviceScalar: return self._to_host_scalar() cdef const scalar* get_raw_ptr(self) except *: - return ( self.c_value).c_obj.get() + return ( self.c_value).c_obj.get() cpdef bool is_valid(self): """ @@ -230,7 +230,7 @@ cdef class DeviceScalar: """ cdef DeviceScalar s = DeviceScalar.__new__(DeviceScalar) # Note: This line requires pylibcudf to be cimported - s.c_value = pylibcudf.Scalar.from_libcudf(move(ptr)) + s.c_value = plc_Scalar.from_libcudf(move(ptr)) s._set_dtype(dtype) return s @@ -369,11 +369,11 @@ def _create_proxy_nat_scalar(dtype): nat = dtype.type('NaT').astype(dtype) if dtype.type == np.datetime64: _set_datetime64_from_np_scalar( - ( result.c_value).c_obj, nat, dtype, True + ( result.c_value).c_obj, nat, dtype, True ) elif dtype.type == np.timedelta64: _set_timedelta64_from_np_scalar( - ( result.c_value).c_obj, nat, dtype, True + ( result.c_value).c_obj, nat, dtype, True ) return result else: diff --git a/python/cudf/cudf/_lib/sort.pyx b/python/cudf/cudf/_lib/sort.pyx index b2b84c17cf4..ff9565b9a89 100644 --- a/python/cudf/cudf/_lib/sort.pyx +++ b/python/cudf/cudf/_lib/sort.pyx @@ -10,11 +10,11 @@ from libcpp.utility cimport move from libcpp.vector cimport vector from cudf._lib.column cimport Column -from cudf._lib.cpp.aggregation cimport rank_method -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.search cimport lower_bound, upper_bound -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport null_order, order as cpp_order +from cudf._lib.pylibcudf.libcudf.aggregation cimport rank_method +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.search cimport lower_bound, upper_bound +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport null_order, order as cpp_order from cudf._lib.utils cimport ( columns_from_pylibcudf_table, table_view_from_columns, diff --git a/python/cudf/cudf/_lib/string_casting.pyx b/python/cudf/cudf/_lib/string_casting.pyx index 3826e71f850..dfad7fd101c 100644 --- a/python/cudf/cudf/_lib/string_casting.pyx +++ b/python/cudf/cudf/_lib/string_casting.pyx @@ -12,39 +12,39 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.utility cimport move -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.convert.convert_booleans cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.convert.convert_booleans cimport ( from_booleans as cpp_from_booleans, to_booleans as cpp_to_booleans, ) -from cudf._lib.cpp.strings.convert.convert_datetime cimport ( +from cudf._lib.pylibcudf.libcudf.strings.convert.convert_datetime cimport ( from_timestamps as cpp_from_timestamps, is_timestamp as cpp_is_timestamp, to_timestamps as cpp_to_timestamps, ) -from cudf._lib.cpp.strings.convert.convert_durations cimport ( +from cudf._lib.pylibcudf.libcudf.strings.convert.convert_durations cimport ( from_durations as cpp_from_durations, to_durations as cpp_to_durations, ) -from cudf._lib.cpp.strings.convert.convert_floats cimport ( +from cudf._lib.pylibcudf.libcudf.strings.convert.convert_floats cimport ( from_floats as cpp_from_floats, to_floats as cpp_to_floats, ) -from cudf._lib.cpp.strings.convert.convert_integers cimport ( +from cudf._lib.pylibcudf.libcudf.strings.convert.convert_integers cimport ( from_integers as cpp_from_integers, hex_to_integers as cpp_hex_to_integers, integers_to_hex as cpp_integers_to_hex, is_hex as cpp_is_hex, to_integers as cpp_to_integers, ) -from cudf._lib.cpp.strings.convert.convert_ipv4 cimport ( +from cudf._lib.pylibcudf.libcudf.strings.convert.convert_ipv4 cimport ( integers_to_ipv4 as cpp_integers_to_ipv4, ipv4_to_integers as cpp_ipv4_to_integers, is_ipv4 as cpp_is_ipv4, ) -from cudf._lib.cpp.types cimport data_type, type_id +from cudf._lib.pylibcudf.libcudf.types cimport data_type, type_id from cudf._lib.types cimport underlying_type_t_type_id import cudf diff --git a/python/cudf/cudf/_lib/strings/attributes.pyx b/python/cudf/cudf/_lib/strings/attributes.pyx index c1b69dda353..1f3d7c4eb1b 100644 --- a/python/cudf/cudf/_lib/strings/attributes.pyx +++ b/python/cudf/cudf/_lib/strings/attributes.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -6,9 +6,9 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.strings.attributes cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.strings.attributes cimport ( code_points as cpp_code_points, count_bytes as cpp_count_bytes, count_characters as cpp_count_characters, diff --git a/python/cudf/cudf/_lib/strings/capitalize.pyx b/python/cudf/cudf/_lib/strings/capitalize.pyx index f6a80ac8fbe..1420a2bbaf2 100644 --- a/python/cudf/cudf/_lib/strings/capitalize.pyx +++ b/python/cudf/cudf/_lib/strings/capitalize.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2022, NVIDIA CORPORATION. +# Copyright (c) 2018-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -6,9 +6,9 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.strings.capitalize cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.strings.capitalize cimport ( capitalize as cpp_capitalize, is_title as cpp_is_title, title as cpp_title, diff --git a/python/cudf/cudf/_lib/strings/char_types.pyx b/python/cudf/cudf/_lib/strings/char_types.pyx index 14d78cdaa51..5b7b6d19d9e 100644 --- a/python/cudf/cudf/_lib/strings/char_types.pyx +++ b/python/cudf/cudf/_lib/strings/char_types.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2023, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp cimport bool @@ -8,10 +8,10 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.char_types cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.char_types cimport ( all_characters_of_type as cpp_all_characters_of_type, filter_characters_of_type as cpp_filter_characters_of_type, string_character_types, diff --git a/python/cudf/cudf/_lib/strings/combine.pyx b/python/cudf/cudf/_lib/strings/combine.pyx index 7d86d34ab25..288f333d4d8 100644 --- a/python/cudf/cudf/_lib/strings/combine.pyx +++ b/python/cudf/cudf/_lib/strings/combine.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from cudf.core.buffer import acquire_spill_lock @@ -6,17 +6,17 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.combine cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.combine cimport ( concatenate as cpp_concatenate, join_list_elements as cpp_join_list_elements, join_strings as cpp_join_strings, output_if_empty_list, separator_on_nulls, ) -from cudf._lib.cpp.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view from cudf._lib.scalar cimport DeviceScalar from cudf._lib.utils cimport table_view_from_columns diff --git a/python/cudf/cudf/_lib/strings/contains.pyx b/python/cudf/cudf/_lib/strings/contains.pyx index 82034f7f8b7..087acd8062d 100644 --- a/python/cudf/cudf/_lib/strings/contains.pyx +++ b/python/cudf/cudf/_lib/strings/contains.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from cython.operator cimport dereference from libc.stdint cimport uint32_t @@ -10,17 +10,17 @@ from libcpp.string cimport string from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.contains cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.contains cimport ( contains_re as cpp_contains_re, count_re as cpp_count_re, like as cpp_like, matches_re as cpp_matches_re, ) -from cudf._lib.cpp.strings.regex_flags cimport regex_flags -from cudf._lib.cpp.strings.regex_program cimport regex_program +from cudf._lib.pylibcudf.libcudf.strings.regex_flags cimport regex_flags +from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/strings/convert/convert_fixed_point.pyx b/python/cudf/cudf/_lib/strings/convert/convert_fixed_point.pyx index 2085d5c2896..6faff606226 100644 --- a/python/cudf/cudf/_lib/strings/convert/convert_fixed_point.pyx +++ b/python/cudf/cudf/_lib/strings/convert/convert_fixed_point.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2023, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. import cudf @@ -8,14 +8,14 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.strings.convert.convert_fixed_point cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.strings.convert.convert_fixed_point cimport ( from_fixed_point as cpp_from_fixed_point, is_fixed_point as cpp_is_fixed_point, to_fixed_point as cpp_to_fixed_point, ) -from cudf._lib.cpp.types cimport data_type, type_id +from cudf._lib.pylibcudf.libcudf.types cimport data_type, type_id @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/strings/convert/convert_floats.pyx b/python/cudf/cudf/_lib/strings/convert/convert_floats.pyx index d1617d85593..341cbc99dab 100644 --- a/python/cudf/cudf/_lib/strings/convert/convert_floats.pyx +++ b/python/cudf/cudf/_lib/strings/convert/convert_floats.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move @@ -6,9 +6,9 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.strings.convert.convert_floats cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.strings.convert.convert_floats cimport ( is_float as cpp_is_float, ) diff --git a/python/cudf/cudf/_lib/strings/convert/convert_integers.pyx b/python/cudf/cudf/_lib/strings/convert/convert_integers.pyx index 52a4791775a..081b03cdc0d 100644 --- a/python/cudf/cudf/_lib/strings/convert/convert_integers.pyx +++ b/python/cudf/cudf/_lib/strings/convert/convert_integers.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move @@ -6,9 +6,9 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.strings.convert.convert_integers cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.strings.convert.convert_integers cimport ( is_integer as cpp_is_integer, ) diff --git a/python/cudf/cudf/_lib/strings/convert/convert_lists.pyx b/python/cudf/cudf/_lib/strings/convert/convert_lists.pyx index 1a89fa7604b..4418bf2a72d 100644 --- a/python/cudf/cudf/_lib/strings/convert/convert_lists.pyx +++ b/python/cudf/cudf/_lib/strings/convert/convert_lists.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move @@ -6,10 +6,10 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.convert.convert_lists cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.convert.convert_lists cimport ( format_list_column as cpp_format_list_column, ) diff --git a/python/cudf/cudf/_lib/strings/convert/convert_urls.pyx b/python/cudf/cudf/_lib/strings/convert/convert_urls.pyx index bc8123281f0..5f62efe5c00 100644 --- a/python/cudf/cudf/_lib/strings/convert/convert_urls.pyx +++ b/python/cudf/cudf/_lib/strings/convert/convert_urls.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move @@ -6,9 +6,9 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.strings.convert.convert_urls cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.strings.convert.convert_urls cimport ( url_decode as cpp_url_decode, url_encode as cpp_url_encode, ) diff --git a/python/cudf/cudf/_lib/strings/extract.pyx b/python/cudf/cudf/_lib/strings/extract.pyx index d3d8610cdf0..3b80c4f6368 100644 --- a/python/cudf/cudf/_lib/strings/extract.pyx +++ b/python/cudf/cudf/_lib/strings/extract.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from cython.operator cimport dereference from libc.stdint cimport uint32_t @@ -9,11 +9,11 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.strings.extract cimport extract as cpp_extract -from cudf._lib.cpp.strings.regex_flags cimport regex_flags -from cudf._lib.cpp.strings.regex_program cimport regex_program -from cudf._lib.cpp.table.table cimport table +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.strings.extract cimport extract as cpp_extract +from cudf._lib.pylibcudf.libcudf.strings.regex_flags cimport regex_flags +from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program +from cudf._lib.pylibcudf.libcudf.table.table cimport table from cudf._lib.utils cimport data_from_unique_ptr diff --git a/python/cudf/cudf/_lib/strings/find.pyx b/python/cudf/cudf/_lib/strings/find.pyx index 341776b102c..3c0009ee569 100644 --- a/python/cudf/cudf/_lib/strings/find.pyx +++ b/python/cudf/cudf/_lib/strings/find.pyx @@ -4,7 +4,7 @@ import cudf._lib.pylibcudf as plc from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.types cimport size_type @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/strings/find_multiple.pyx b/python/cudf/cudf/_lib/strings/find_multiple.pyx index c2a97a4fd7c..c75f28db21b 100644 --- a/python/cudf/cudf/_lib/strings/find_multiple.pyx +++ b/python/cudf/cudf/_lib/strings/find_multiple.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move @@ -6,9 +6,9 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.strings.find_multiple cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.strings.find_multiple cimport ( find_multiple as cpp_find_multiple, ) diff --git a/python/cudf/cudf/_lib/strings/findall.pyx b/python/cudf/cudf/_lib/strings/findall.pyx index 6df1d32dcfe..0d409889bc8 100644 --- a/python/cudf/cudf/_lib/strings/findall.pyx +++ b/python/cudf/cudf/_lib/strings/findall.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2023, NVIDIA CORPORATION. +# Copyright (c) 2019-2024, NVIDIA CORPORATION. from cython.operator cimport dereference from libc.stdint cimport uint32_t @@ -9,11 +9,11 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.strings.findall cimport findall as cpp_findall -from cudf._lib.cpp.strings.regex_flags cimport regex_flags -from cudf._lib.cpp.strings.regex_program cimport regex_program +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.strings.findall cimport findall as cpp_findall +from cudf._lib.pylibcudf.libcudf.strings.regex_flags cimport regex_flags +from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/strings/json.pyx b/python/cudf/cudf/_lib/strings/json.pyx index 861e0daa6e3..560f284b56c 100644 --- a/python/cudf/cudf/_lib/strings/json.pyx +++ b/python/cudf/cudf/_lib/strings/json.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move @@ -6,10 +6,10 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.json cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.json cimport ( get_json_object as cpp_get_json_object, get_json_object_options, ) diff --git a/python/cudf/cudf/_lib/strings/padding.pyx b/python/cudf/cudf/_lib/strings/padding.pyx index 340d7eb52d8..9226810951f 100644 --- a/python/cudf/cudf/_lib/strings/padding.pyx +++ b/python/cudf/cudf/_lib/strings/padding.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.string cimport string @@ -7,14 +7,17 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type from enum import IntEnum -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.strings.padding cimport pad as cpp_pad, zfill as cpp_zfill -from cudf._lib.cpp.strings.side_type cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.strings.padding cimport ( + pad as cpp_pad, + zfill as cpp_zfill, +) +from cudf._lib.pylibcudf.libcudf.strings.side_type cimport ( side_type, underlying_type_t_side_type, ) diff --git a/python/cudf/cudf/_lib/strings/repeat.pyx b/python/cudf/cudf/_lib/strings/repeat.pyx index 4896fb74f41..2b8116848cf 100644 --- a/python/cudf/cudf/_lib/strings/repeat.pyx +++ b/python/cudf/cudf/_lib/strings/repeat.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022, NVIDIA CORPORATION. +# Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move @@ -6,10 +6,10 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.strings cimport repeat as cpp_repeat -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.strings cimport repeat as cpp_repeat +from cudf._lib.pylibcudf.libcudf.types cimport size_type @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/strings/replace.pyx b/python/cudf/cudf/_lib/strings/replace.pyx index 80c9ba95fd8..880201e65a2 100644 --- a/python/cudf/cudf/_lib/strings/replace.pyx +++ b/python/cudf/cudf/_lib/strings/replace.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr @@ -7,14 +7,14 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.replace cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.replace cimport ( replace as cpp_replace, replace_slice as cpp_replace_slice, ) -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/strings/replace_re.pyx b/python/cudf/cudf/_lib/strings/replace_re.pyx index 1fbbaa8f44f..e13880a6186 100644 --- a/python/cudf/cudf/_lib/strings/replace_re.pyx +++ b/python/cudf/cudf/_lib/strings/replace_re.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from cython.operator cimport dereference from libcpp.memory cimport unique_ptr @@ -9,16 +9,16 @@ from libcpp.vector cimport vector from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.regex_flags cimport regex_flags -from cudf._lib.cpp.strings.regex_program cimport regex_program -from cudf._lib.cpp.strings.replace_re cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.regex_flags cimport regex_flags +from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program +from cudf._lib.pylibcudf.libcudf.strings.replace_re cimport ( replace_re as cpp_replace_re, replace_with_backrefs as cpp_replace_with_backrefs, ) -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/strings/split/partition.pyx b/python/cudf/cudf/_lib/strings/split/partition.pyx index 281d131372a..be377c0f86b 100644 --- a/python/cudf/cudf/_lib/strings/split/partition.pyx +++ b/python/cudf/cudf/_lib/strings/split/partition.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move @@ -6,13 +6,13 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.split.partition cimport ( +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.split.partition cimport ( partition as cpp_partition, rpartition as cpp_rpartition, ) -from cudf._lib.cpp.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table cimport table from cudf._lib.scalar cimport DeviceScalar from cudf._lib.utils cimport data_from_unique_ptr diff --git a/python/cudf/cudf/_lib/strings/split/split.pyx b/python/cudf/cudf/_lib/strings/split/split.pyx index 08c7dde921f..942235686d7 100644 --- a/python/cudf/cudf/_lib/strings/split/split.pyx +++ b/python/cudf/cudf/_lib/strings/split/split.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from cython.operator cimport dereference from libcpp.memory cimport unique_ptr @@ -8,12 +8,12 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.regex_flags cimport regex_flags -from cudf._lib.cpp.strings.regex_program cimport regex_program -from cudf._lib.cpp.strings.split.split cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.regex_flags cimport regex_flags +from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program +from cudf._lib.pylibcudf.libcudf.strings.split.split cimport ( rsplit as cpp_rsplit, rsplit_re as cpp_rsplit_re, rsplit_record as cpp_rsplit_record, @@ -23,8 +23,8 @@ from cudf._lib.cpp.strings.split.split cimport ( split_record as cpp_split_record, split_record_re as cpp_split_record_re, ) -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.scalar cimport DeviceScalar from cudf._lib.utils cimport data_from_unique_ptr diff --git a/python/cudf/cudf/_lib/strings/strip.pyx b/python/cudf/cudf/_lib/strings/strip.pyx index 2c53782d6ba..199fa5fc3b6 100644 --- a/python/cudf/cudf/_lib/strings/strip.pyx +++ b/python/cudf/cudf/_lib/strings/strip.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move @@ -6,11 +6,11 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.side_type cimport side_type -from cudf._lib.cpp.strings.strip cimport strip as cpp_strip +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.side_type cimport side_type +from cudf._lib.pylibcudf.libcudf.strings.strip cimport strip as cpp_strip from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/strings/substring.pyx b/python/cudf/cudf/_lib/strings/substring.pyx index e6b8cdd28ee..170c1016b89 100644 --- a/python/cudf/cudf/_lib/strings/substring.pyx +++ b/python/cudf/cudf/_lib/strings/substring.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. import numpy as np @@ -8,14 +8,16 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.strings.substring cimport slice_strings as cpp_slice_strings -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.strings.substring cimport ( + slice_strings as cpp_slice_strings, +) +from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.scalar import as_device_scalar -from cudf._lib.cpp.scalar.scalar cimport numeric_scalar +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport numeric_scalar from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/strings/translate.pyx b/python/cudf/cudf/_lib/strings/translate.pyx index 55659e98dcb..8846e2e280d 100644 --- a/python/cudf/cudf/_lib/strings/translate.pyx +++ b/python/cudf/cudf/_lib/strings/translate.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2023, NVIDIA CORPORATION. +# Copyright (c) 2018-2024, NVIDIA CORPORATION. from libcpp cimport bool from libcpp.memory cimport unique_ptr @@ -9,15 +9,15 @@ from libcpp.vector cimport vector from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.scalar.scalar cimport string_scalar -from cudf._lib.cpp.strings.translate cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from cudf._lib.pylibcudf.libcudf.strings.translate cimport ( filter_characters as cpp_filter_characters, filter_type, translate as cpp_translate, ) -from cudf._lib.cpp.types cimport char_utf8 +from cudf._lib.pylibcudf.libcudf.types cimport char_utf8 from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/strings/wrap.pyx b/python/cudf/cudf/_lib/strings/wrap.pyx index 8b0c367e791..92750f21e4d 100644 --- a/python/cudf/cudf/_lib/strings/wrap.pyx +++ b/python/cudf/cudf/_lib/strings/wrap.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move @@ -6,10 +6,10 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.strings.wrap cimport wrap as cpp_wrap -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.strings.wrap cimport wrap as cpp_wrap +from cudf._lib.pylibcudf.libcudf.types cimport size_type @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/strings_udf.pyx b/python/cudf/cudf/_lib/strings_udf.pyx index a59e6db1b72..e952492c45d 100644 --- a/python/cudf/cudf/_lib/strings_udf.pyx +++ b/python/cudf/cudf/_lib/strings_udf.pyx @@ -1,8 +1,8 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. from libc.stdint cimport uint8_t, uint16_t, uintptr_t -from cudf._lib.cpp.strings_udf cimport ( +from cudf._lib.pylibcudf.libcudf.strings_udf cimport ( get_character_cases_table as cpp_get_character_cases_table, get_character_flags_table as cpp_get_character_flags_table, get_special_case_mapping_table as cpp_get_special_case_mapping_table, @@ -18,8 +18,8 @@ from cudf.core.buffer import as_buffer from rmm._lib.device_buffer cimport DeviceBuffer, device_buffer from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column, column_view -from cudf._lib.cpp.strings_udf cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column, column_view +from cudf._lib.pylibcudf.libcudf.strings_udf cimport ( column_from_udf_string_array as cpp_column_from_udf_string_array, free_udf_string_array as cpp_free_udf_string_array, to_string_view_array as cpp_to_string_view_array, diff --git a/python/cudf/cudf/_lib/text.pyx b/python/cudf/cudf/_lib/text.pyx index a7346cdd586..6e63b8758b8 100644 --- a/python/cudf/cudf/_lib/text.pyx +++ b/python/cudf/cudf/_lib/text.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from io import TextIOBase @@ -9,8 +9,8 @@ from libcpp.string cimport string from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.io.text cimport ( +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.io.text cimport ( byte_range_info, data_chunk_source, make_source, diff --git a/python/cudf/cudf/_lib/timezone.pyx b/python/cudf/cudf/_lib/timezone.pyx index 808d1321b0b..53977e984c2 100644 --- a/python/cudf/cudf/_lib/timezone.pyx +++ b/python/cudf/cudf/_lib/timezone.pyx @@ -1,14 +1,14 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.optional cimport make_optional from libcpp.string cimport string from libcpp.utility cimport move -from cudf._lib.cpp.io.timezone cimport ( +from cudf._lib.pylibcudf.libcudf.io.timezone cimport ( make_timezone_transition_table as cpp_make_timezone_transition_table, ) -from cudf._lib.cpp.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table cimport table from cudf._lib.utils cimport columns_from_unique_ptr diff --git a/python/cudf/cudf/_lib/transform.pyx b/python/cudf/cudf/_lib/transform.pyx index d8eb6134042..b325173f20d 100644 --- a/python/cudf/cudf/_lib/transform.pyx +++ b/python/cudf/cudf/_lib/transform.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from numba.np import numpy_support @@ -17,15 +17,20 @@ from libcpp.utility cimport move from rmm._lib.device_buffer cimport DeviceBuffer, device_buffer -cimport cudf._lib.cpp.transform as libcudf_transform +cimport cudf._lib.pylibcudf.libcudf.transform as libcudf_transform from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.expressions cimport expression -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport bitmask_type, data_type, size_type, type_id from cudf._lib.expressions cimport Expression +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.expressions cimport expression +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport ( + bitmask_type, + data_type, + size_type, + type_id, +) from cudf._lib.types cimport underlying_type_t_type_id from cudf._lib.utils cimport ( columns_from_unique_ptr, diff --git a/python/cudf/cudf/_lib/transpose.pyx b/python/cudf/cudf/_lib/transpose.pyx index 51e49b1f27a..82b23439e6a 100644 --- a/python/cudf/cudf/_lib/transpose.pyx +++ b/python/cudf/cudf/_lib/transpose.pyx @@ -1,13 +1,13 @@ -# Copyright (c) 2020-2022, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.utility cimport move from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.transpose cimport transpose as cpp_transpose +from cudf._lib.pylibcudf.libcudf.column.column cimport column +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.transpose cimport transpose as cpp_transpose from cudf._lib.utils cimport columns_from_table_view, table_view_from_columns diff --git a/python/cudf/cudf/_lib/types.pxd b/python/cudf/cudf/_lib/types.pxd index a95db84ceff..519d5ff8554 100644 --- a/python/cudf/cudf/_lib/types.pxd +++ b/python/cudf/cudf/_lib/types.pxd @@ -1,11 +1,13 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libc.stdint cimport int32_t from libcpp cimport bool -cimport cudf._lib.cpp.types as libcudf_types -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.lists.lists_column_view cimport lists_column_view +cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( + lists_column_view, +) ctypedef bool underlying_type_t_order ctypedef bool underlying_type_t_null_order diff --git a/python/cudf/cudf/_lib/types.pyx b/python/cudf/cudf/_lib/types.pyx index 1b4f4617e97..895e1afc502 100644 --- a/python/cudf/cudf/_lib/types.pyx +++ b/python/cudf/cudf/_lib/types.pyx @@ -7,9 +7,11 @@ import pandas as pd from libcpp.memory cimport make_shared, shared_ptr -cimport cudf._lib.cpp.types as libcudf_types -from cudf._lib.cpp.column.column_view cimport column_view -from cudf._lib.cpp.lists.lists_column_view cimport lists_column_view +cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types +from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( + lists_column_view, +) from cudf._lib.types cimport ( underlying_type_t_interpolation, underlying_type_t_order, diff --git a/python/cudf/cudf/_lib/utils.pxd b/python/cudf/cudf/_lib/utils.pxd index 51c69bdcaf9..c5a1e7552b9 100644 --- a/python/cudf/cudf/_lib/utils.pxd +++ b/python/cudf/cudf/_lib/utils.pxd @@ -4,8 +4,8 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector -from cudf._lib.cpp.column.column cimport column_view -from cudf._lib.cpp.table.table cimport table, table_view +from cudf._lib.pylibcudf.libcudf.column.column cimport column_view +from cudf._lib.pylibcudf.libcudf.table.table cimport table, table_view cdef data_from_unique_ptr( diff --git a/python/cudf/cudf/_lib/utils.pyx b/python/cudf/cudf/_lib/utils.pyx index 0afecb215e4..4c4cd48d6ed 100644 --- a/python/cudf/cudf/_lib/utils.pyx +++ b/python/cudf/cudf/_lib/utils.pyx @@ -11,10 +11,10 @@ from libcpp.utility cimport move from libcpp.vector cimport vector from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column, column_view -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport table_view -from cudf._lib.cpp.types cimport size_type +from cudf._lib.pylibcudf.libcudf.column.column cimport column, column_view +from cudf._lib.pylibcudf.libcudf.table.table cimport table +from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from cudf._lib.pylibcudf.libcudf.types cimport size_type try: import ujson as json diff --git a/python/cudf/cudf/core/column/column.py b/python/cudf/cudf/core/column/column.py index 3754ed1392e..371c91dd96f 100644 --- a/python/cudf/cudf/core/column/column.py +++ b/python/cudf/cudf/core/column/column.py @@ -2070,8 +2070,15 @@ def as_column( except (ValueError, TypeError): arbitrary = np.asarray(arbitrary) return as_column(arbitrary, dtype=dtype, nan_as_null=nan_as_null) + elif not isinstance(arbitrary, (abc.Iterable, abc.Sequence)): + raise TypeError( + f"{type(arbitrary).__name__} must be an iterable or sequence." + ) + elif isinstance(arbitrary, abc.Iterator): + arbitrary = list(arbitrary) + # Start of arbitrary that's not handed above but dtype provided - elif isinstance(dtype, pd.DatetimeTZDtype): + if isinstance(dtype, pd.DatetimeTZDtype): raise NotImplementedError( "Use `tz_localize()` to construct timezone aware data." ) @@ -2127,11 +2134,7 @@ def as_column( return cudf.core.column.ListColumn.from_sequences(arbitrary) raise return as_column(data, nan_as_null=nan_as_null) - elif not isinstance(arbitrary, (abc.Iterable, abc.Sequence)): - # TODO: This validation should probably be done earlier? - raise TypeError( - f"{type(arbitrary).__name__} must be an iterable or sequence." - ) + from_pandas = nan_as_null is None or nan_as_null if dtype is not None: dtype = cudf.dtype(dtype) @@ -2147,7 +2150,6 @@ def as_column( arbitrary = pd.Series(arbitrary, dtype=dtype) return as_column(arbitrary, nan_as_null=nan_as_null, dtype=dtype) else: - arbitrary = list(arbitrary) for element in arbitrary: # Carve-outs that cannot be parsed by pyarrow/pandas if is_column_like(element): diff --git a/python/cudf/cudf/core/index.py b/python/cudf/cudf/core/index.py index 0710f0f5c42..209e582e5d6 100644 --- a/python/cudf/cudf/core/index.py +++ b/python/cudf/cudf/core/index.py @@ -2373,6 +2373,11 @@ def tz_convert(self, tz: str | None): result_col = self._column.tz_convert(tz) return DatetimeIndex._from_data({self.name: result_col}) + def repeat(self, repeats, axis=None): + res = super().repeat(repeats, axis=axis) + res._freq = None + return res + class TimedeltaIndex(Index): """ diff --git a/python/cudf/cudf/core/indexed_frame.py b/python/cudf/cudf/core/indexed_frame.py index dc261707867..904cd0c69c2 100644 --- a/python/cudf/cudf/core/indexed_frame.py +++ b/python/cudf/cudf/core/indexed_frame.py @@ -4871,13 +4871,16 @@ def repeat(self, repeats, axis=None): 1 2 dtype: int64 """ - return self._from_columns_like_self( + res = self._from_columns_like_self( Frame._repeat( [*self._index._data.columns, *self._columns], repeats, axis ), self._column_names, self._index_names, ) + if isinstance(res.index, cudf.DatetimeIndex): + res.index._freq = None + return res def astype( self, diff --git a/python/cudf/cudf/tests/test_index.py b/python/cudf/cudf/tests/test_index.py index 8b7ee1dccf8..8e7532d044d 100644 --- a/python/cudf/cudf/tests/test_index.py +++ b/python/cudf/cudf/tests/test_index.py @@ -3252,3 +3252,17 @@ def test_Index_init_with_nans(): assert gi.dtype == np.dtype("float64") pi = pd.Index([1, 2, 3, np.nan]) assert_eq(pi, gi) + + +def test_index_datetime_repeat(): + gidx = cudf.date_range("2021-01-01", periods=3, freq="D") + pidx = gidx.to_pandas() + + actual = gidx.repeat(5) + expected = pidx.repeat(5) + + assert_eq(actual, expected) + + actual = gidx.to_frame().repeat(5) + + assert_eq(actual.index, expected) diff --git a/python/cudf_kafka/cudf_kafka/_lib/kafka.pxd b/python/cudf_kafka/cudf_kafka/_lib/kafka.pxd index 068837d04ee..84a3a32646d 100644 --- a/python/cudf_kafka/cudf_kafka/_lib/kafka.pxd +++ b/python/cudf_kafka/cudf_kafka/_lib/kafka.pxd @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libc.stdint cimport int32_t, int64_t from libcpp cimport bool @@ -7,8 +7,8 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector -from cudf._lib.cpp.io.datasource cimport datasource from cudf._lib.io.datasource cimport Datasource +from cudf._lib.pylibcudf.libcudf.io.datasource cimport datasource cdef extern from "cudf_kafka/kafka_callback.hpp" \ diff --git a/python/cudf_kafka/cudf_kafka/_lib/kafka.pyx b/python/cudf_kafka/cudf_kafka/_lib/kafka.pyx index 2fbaacff7c6..2927dc0aa9a 100644 --- a/python/cudf_kafka/cudf_kafka/_lib/kafka.pyx +++ b/python/cudf_kafka/cudf_kafka/_lib/kafka.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023, NVIDIA CORPORATION. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. from libc.stdint cimport int32_t, int64_t from libcpp cimport bool, nullptr @@ -7,7 +7,7 @@ from libcpp.memory cimport make_unique, unique_ptr from libcpp.string cimport string from libcpp.utility cimport move -from cudf._lib.cpp.io.datasource cimport datasource +from cudf._lib.pylibcudf.libcudf.io.datasource cimport datasource from cudf_kafka._lib.kafka cimport kafka_consumer