cudf.DataFrame.to_cupy#
- DataFrame.to_cupy(dtype: Dtype | None = None, copy: bool = False, na_value=None) cupy.ndarray [source]#
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 thatto_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.
- dtypestr or
- Returns:
- cupy.ndarray