numpy.ndarray.to_device — NumPy v2.6.dev0 Manual

method

ndarray.to_device(device, /, *, stream=None)

#

For Array API compatibility. Since NumPy only supports CPU arrays, this method is a no-op that returns the same array.

Parameters:device“cpu”Must be "cpu".

streamNone, optionalCurrently unsupported.

Returns:outSelfReturns the same array.