Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Document limitation using cudf.pandas proxy arrays #16955

Merged
Next Next commit
[DOC] Document limitation using and functions using the data buffer
  • Loading branch information
Matt711 committed Sep 30, 2024
commit 621de4d5f949afef8360913cf6d5a1b2f4ce3e1c
13 changes: 13 additions & 0 deletions docs/cudf/source/cudf_pandas/faq.md
Original file line number Diff line number Diff line change
@@ -181,6 +181,19 @@ There are a few known limitations that you should be aware of:
```
- `cudf.pandas` (and cuDF in general) is only compatible with pandas 2. Version
24.02 of cudf was the last to support pandas 1.5.x.
- `cudf.pandas` can interface with functions that utilize NumPy's C API, but doing so requires
a data transfer from device to host to ensure that the [data buffer](https://numpy.org/doc/stable/dev/internals.html#internal-organization-of-numpy-arrays)(aka the underlying C array) is set correctly. For example, calling `.values`
below produces a NumPy proxy array that
Matt711 marked this conversation as resolved.
Show resolved Hide resolved

```python
arr = pd.DataFrame("a":range(10)).values() # implicit DtoH transfer
Matt711 marked this conversation as resolved.
Show resolved Hide resolved
```
With the data buffer set, other functions which require the data buffer can be used. For example,

```python
import torch
x = torch.from_numpy(arr)
```

## Can I force running on the CPU?

Loading