cudf.RangeIndex.to_numpy#

RangeIndex.to_numpy(
dtype: Dtype | None = None,
copy: bool = False,
na_value=None,
) np.ndarray[source]#

Convert the RangeIndex to a NumPy array.

Parameters:
dtypestr or numpy.dtype, optional

The dtype to cast the result to. Defaults to the RangeIndex dtype.

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_numpy() is no-copy. Rather, copy=True ensures that a copy is made, even if not strictly necessary.

na_valueAny, default None

Value to use for missing values. Since RangeIndex cannot contain missing values, this parameter has no effect.

Returns:
numpy.ndarray