dpctl.tensor.copy

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

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

Parameters:
  • ary (usm_ndarray) – Input array

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

Returns:

A copy of the input array.

Return type:

usm_ndarray

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

"C"

C-contiguous memory layout

"F"

Fortran-contiguous memory layout

"A"

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

"K"

match the layout of usm_ary as closely as possible.