Skip to content

Commit

Permalink
Explicitly prohibit conversion of columns to host arrays.
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Apr 28, 2021
1 parent f575e88 commit 6583e59
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 __array__(self, dtype=None):
raise TypeError(
"Implicit conversion to a host NumPy array via __array__ is not "
"allowed. To explicitly construct a host array, consider using "
".to_array()"
)

@property
def __cuda_array_interface__(self):
raise NotImplementedError(
Expand Down

0 comments on commit 6583e59

Please sign in to comment.