dpnp.tensor.copy

dpnp.tensor.copy(usm_ary, /, *, order='K')[source]

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

Parameters:
  • usm_ary (usm_ndarray) -- Input array

  • order ({"C", "F", "A", "K"}, optional) --

    Controls the memory layout of the output array

    Default: "K".

Returns:

out -- A copy of the input array.

Return type:

usm_ndarray

Notes

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.