# 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 order is ‘A’, it uses ‘F’ if a is column-major and uses C otherwise. And when order is ‘K’, it keeps strides as closely as possible. The copy of a on the current device. cupy.ndarray