cudf.Series.to_cupy#

Series.to_cupy(dtype: Union[Dtype, None] = None, copy: bool = True, na_value=None) cupy.ndarray#

Convert the Frame to a CuPy array.

Parameters
dtypestr or numpy.dtype, optional

The dtype to pass to numpy.asarray().

copybool, default False

Whether to ensure that the returned value is not a view on another array. Note that copy=False does not ensure that to_cupy() is no-copy. Rather, copy=True ensure that a copy is made, even if not strictly necessary.

na_valueAny, default None

The value to use for missing values. The default value depends on dtype and the dtypes of the DataFrame columns.

Returns
cupy.ndarray