dpctl.tensor.copy(ary, order='K')[source]

Creates a copy of given instance of dpctl.tensor.usm_ndarray.

  • ary (usm_ndarray) – Input array

  • order ("C", "F", "A", "K", optional) – Controls the memory layout of the output array


A copy of the input array.

Return type:


Memory layout of the copy is controlled by order keyword, following NumPy’s conventions. The order keywords can be one of the following:


C-contiguous memory layout


Fortran-contiguous memory layout


Fortran-contiguous if the input array is also Fortran-contiguous, otherwise C-contiguous


match the layout of usm_ary as closely as possible.