[BUG] Series.clip does not work with numpy/cupy clip
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
**Describe the bug**
rewriting code with `import cudf as pd`
**Steps/Code to reproduce bug**
```
>>> import cudf as pd
>>> import cupy as np
>>> pd.__version__
'22.12.01'
>>> np.__version__
'11.4.0'
>>> df = pd.DataFrame({'a': range(10, 30)})
>>> np.clip(df.to_pandas().a, a_min=15, a_max=25)
0 15
1 15
2 15
3 15
4 15
5 15
6 16
7 17
8 18
9 19
10 20
11 21
12 22
13 23
14 24
15 25
16 25
17 25
18 25
19 25
Name: a, dtype: int64
>>> np.clip(df.a, a_min=15, a_max=25)
Traceback (most recent call last):
File "", line 1, in
File ".../python3.8/site-packages/cupy/_math/misc.py", line 172, in clip
return a.clip(a_min, a_max, out=out)
File ".../python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
TypeError: clip() got an unexpected keyword argument 'out'
```
**Additional context**
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.clip.html
```
*args, **kwargs
Additional keywords have no effect but might be accepted for compatibility with numpy.
```
Contributor guide
Assessment
This issue has not been assessed yet.