From ff9fb427a90a7f5b9b42b75ec832a900e7915e89 Mon Sep 17 00:00:00 2001 From: Matthew Murray Date: Mon, 7 Oct 2024 14:29:57 -0700 Subject: [PATCH] remove explicit casts --- python/cudf/cudf/_lib/nvtext/generate_ngrams.pyx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/python/cudf/cudf/_lib/nvtext/generate_ngrams.pyx b/python/cudf/cudf/_lib/nvtext/generate_ngrams.pyx index cc9f139cdf9..7fdf9258b7f 100644 --- a/python/cudf/cudf/_lib/nvtext/generate_ngrams.pyx +++ b/python/cudf/cudf/_lib/nvtext/generate_ngrams.pyx @@ -2,9 +2,6 @@ from cudf.core.buffer import acquire_spill_lock -from pylibcudf.libcudf.types cimport size_type -from pylibcudf.scalar cimport Scalar as plc_Scalar - from cudf._lib.column cimport Column from pylibcudf import nvtext @@ -14,8 +11,8 @@ from pylibcudf import nvtext def generate_ngrams(Column strings, int ngrams, object py_separator): result = nvtext.generate_ngrams.generate_ngrams( strings.to_pylibcudf(mode="read"), - ngrams, - py_separator.device_value.c_value + ngrams, + py_separator.device_value.c_value ) return Column.from_pylibcudf(result) @@ -24,7 +21,7 @@ def generate_ngrams(Column strings, int ngrams, object py_separator): def generate_character_ngrams(Column strings, int ngrams): result = nvtext.generate_ngrams.generate_character_ngrams( strings.to_pylibcudf(mode="read"), - ngrams + ngrams ) return Column.from_pylibcudf(result) @@ -33,6 +30,6 @@ def generate_character_ngrams(Column strings, int ngrams): def hash_character_ngrams(Column strings, int ngrams): result = nvtext.generate_ngrams.hash_character_ngrams( strings.to_pylibcudf(mode="read"), - ngrams + ngrams ) return Column.from_pylibcudf(result)