Skip to content

Commit

Permalink
set copy=True for cuDF
Browse files Browse the repository at this point in the history
  • Loading branch information
LiamConnors committed Sep 9, 2024
1 parent 5dc4300 commit 77b96e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions narwhals/_pandas_like/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,8 @@ def to_numpy(self, dtype: Any = None, copy: bool | None = None) -> Any:
from narwhals._pandas_like.series import PANDAS_TO_NUMPY_DTYPE_MISSING

if copy is None:
# pandas default differs from Polars
copy = False
# pandas default differs from Polars, but cuDF default is True
copy = self._implementation is Implementation.CUDF

if dtype is not None:
return self._native_frame.to_numpy(dtype=dtype, copy=copy)
Expand Down

0 comments on commit 77b96e9

Please sign in to comment.