-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix strings strip() to accept only str Scalar for to_strip parameter (#…
…10597) Closes #10591 Ensures `to_strip` parameter is a `str` type when converting it to `cudf.Scalar`. It will now through a `TypeError` as follows ``` libstrings.strip(self._column, cudf.Scalar(to_strip, "str")) File "/conda/envs/rapids/lib/python3.8/site-packages/cudf-22.6.0a0+96.g0aef0c1c3e.dirty-py3.8-linux-x86_64.egg/cudf/core/scalar.py", line 78, in __init__ self._host_value, self._host_dtype = self._preprocess_host_value( File "/conda/envs/rapids/lib/python3.8/site-packages/cudf-22.6.0a0+96.g0aef0c1c3e.dirty-py3.8-linux-x86_64.egg/cudf/core/scalar.py", line 128, in _preprocess_host_value raise TypeError("Lists may not be cast to a different dtype") TypeError: Lists may not be cast to a different dtype ``` This will also prevent the _sticky_ CUDA error. Also, added the `str` parameter to other `cudf.Scalar` calls where only strings are supported as well. Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Ashwin Srinath (https://github.com/shwina) - GALI PREM SAGAR (https://github.com/galipremsagar) URL: #10597
- Loading branch information
1 parent
5f4f232
commit 956c7b5
Showing
2 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters