Skip to content

Commit 0d3e45c

Browse files
authored
Merge aeaa633 into 4550d18
2 parents 4550d18 + aeaa633 commit 0d3e45c

File tree

10 files changed

+329
-53
lines changed

10 files changed

+329
-53
lines changed

dpnp/dpnp_array.py

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,10 +696,35 @@ def conjugate(self):
696696
else:
697697
return dpnp.conjugate(self)
698698

699-
def copy(self, order="C"):
699+
def copy(self, order="C", device=None, usm_type=None, sycl_queue=None):
700700
"""
701701
Return a copy of the array.
702702
703+
Refer to :obj:`dpnp.copy` for full documentation.
704+
705+
Parameters
706+
----------
707+
order : {"C", "F", "A", "K"}, optional
708+
Memory layout of the newly output array.
709+
Default: ``"C"``.
710+
device : {None, string, SyclDevice, SyclQueue}, optional
711+
An array API concept of device where the output array is created.
712+
The `device` can be ``None`` (the default), an OneAPI filter
713+
selector string, an instance of :class:`dpctl.SyclDevice`
714+
corresponding to a non-partitioned SYCL device, an instance of
715+
:class:`dpctl.SyclQueue`, or a `Device` object returned by
716+
:obj:`dpnp.dpnp_array.dpnp_array.device` property.
717+
Default: ``None``.
718+
usm_type : {None, "device", "shared", "host"}, optional
719+
The type of SYCL USM allocation for the output array.
720+
Default: ``None``.
721+
sycl_queue : {None, SyclQueue}, optional
722+
A SYCL queue to use for output array allocation and copying. The
723+
`sycl_queue` can be passed as ``None`` (the default), which means
724+
to get the SYCL queue from `device` keyword if present or to use
725+
a default queue.
726+
Default: ``None``.
727+
703728
Returns
704729
-------
705730
out : dpnp.ndarray
@@ -735,7 +760,13 @@ def copy(self, order="C"):
735760
736761
"""
737762

738-
return dpnp.copy(self, order=order)
763+
return dpnp.copy(
764+
self,
765+
order=order,
766+
device=device,
767+
usm_type=usm_type,
768+
sycl_queue=sycl_queue,
769+
)
739770

740771
# 'ctypes',
741772

0 commit comments

Comments
 (0)