NVIDIA / NVIDIA/cudf

[ENH] Avoid repeated bounds-checking in `take` when arguments are known in bounds

Open
#13,456 1 comment 0 reactions 0 assignees View on GitHub
improvement Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

As noted in #13419, there are likely places where we call `take` on a column with a gather map that is known to be in-bounds. We should therefore avoid an (unnecessary) bounds-check in these cases where we know this by passing `check_bounds=False`.

_Originally posted by @bdice in https://github.com/rapidsai/cudf/pull/13419#discussion_r1203131049_

```[tasklist]
### Tasks
- [ ] parquet.py `_get_groups_and_offsets`
- [ ] `_DataFrameLocIndexer._getitem_tuple_arg`
- [ ] `CategoricalColumn._get_decategorized_column`
- [ ] `ColumnBase.slice`
- [ ] `Rangindex._gather` ?
- [ ] `Groupby.agg`
- [ ] timezones.py `utc_to_local` and `local_to_utc`
- [ ] `MultiIndex.__repr__`
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.