Skip to content

Commit

Permalink
Explicitly prohibit conversion of columns to arrow (host) arrays.
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Apr 28, 2021
1 parent 6583e59 commit 381d15f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/cudf/cudf/core/column/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,13 @@ def argsort(
)
return sorted_indices

def __arrow_array__(self, type=None):
raise TypeError(
"Implicit conversion to a host PyArrow Array via __arrow_array__ "
"is not allowed, To explicitly construct a PyArrow Array, "
"consider using .to_arrow()"
)

def __array__(self, dtype=None):
raise TypeError(
"Implicit conversion to a host NumPy array via __array__ is not "
Expand Down

0 comments on commit 381d15f

Please sign in to comment.