Behaviour of inplace for `copy_range` when range is empty.
Open
Python
question
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
In `copying.copy_range` we have an `inplace=False/True` argument.
If `inplace` is `True`, then the column is modified in place, if `inplace` is False, a new (copied) column is created and then modified. If the case that the range we are copying is empty, at present `inplace=False` _still_ returns a new copy (even though `copy_range` is a no-op in this situation).
Should it be allowed that
```
copy_range(source, target, empty_range, inplace=False)
```
Can return `target` (rather than a copy of `target`)?
See discussion where this came p: https://github.com/rapidsai/cudf/pull/12075#discussion_r1015307155
Contributor guide
Assessment
This issue has not been assessed yet.