cupy.copy¶
-
cupy.copy(a, order='K')[source]¶ Creates a copy of a given array on the current device.
This function allocates the new array on the current device. If the given array is allocated on the different device, then this function tries to copy the contents over the devices.
- Parameters
a (cupy.ndarray) – The source array.
order ({'C', 'F', 'A', 'K'}) – Row-major (C-style) or column-major (Fortran-style) order. When
orderis'A', it uses'F'ifais column-major and uses'C'otherwise. And whenorderis'K', it keeps strides as closely as possible.
- Returns
The copy of
aon the current device.- Return type
See also