W3cubDocs

/NumPy 2.4

numpy.ndarray.to_device

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, optional

Currently unsupported.

Returns:
outSelf

Returns the same array.

© 2005–2024 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/2.4/reference/generated/numpy.ndarray.to_device.html