Skip to content

Commit 12d6693

Browse files
renamed keyword in dpctl.tensor.from_numpy, and its alias asnumpy from queue to sycl_queue
1 parent 1626363 commit 12d6693

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

dpctl/tensor/_copy_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ def copy_to_numpy(ary):
9393
)
9494

9595

96-
def copy_from_numpy(np_ary, usm_type="device", queue=None):
96+
def copy_from_numpy(np_ary, usm_type="device", sycl_queue=None):
9797
"Copies numpy array `np_ary` into a new usm_ndarray"
9898
# This may peform a copy to meet stated requirements
9999
Xnp = np.require(np_ary, requirements=["A", "O", "C", "E"])
100-
if queue:
101-
ctor_kwargs = {"queue": queue}
100+
if sycl_queue:
101+
ctor_kwargs = {"queue": sycl_queue}
102102
else:
103103
ctor_kwargs = dict()
104104
Xusm = dpt.usm_ndarray(

dpctl/tests/test_tensor_asarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def test_asarray_copy_false():
163163
q = dpctl.SyclQueue()
164164
except dpctl.SyclQueueCreationError:
165165
pytest.skip("Could not create a queue")
166-
X = dpt.from_numpy(np.random.randn(10, 4), usm_type="device", queue=q)
166+
X = dpt.from_numpy(np.random.randn(10, 4), usm_type="device", sycl_queue=q)
167167
Y1 = dpt.asarray(X, copy=False, order="K")
168168
assert Y1 is X
169169
Y1c = dpt.asarray(X, copy=True, order="K")

dpctl/tests/test_usm_ndarray_ctor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ def test_pyx_capi_check_constants():
562562
def test_tofrom_numpy(shape, dtype, usm_type):
563563
q = dpctl.SyclQueue()
564564
Xnp = np.zeros(shape, dtype=dtype)
565-
Xusm = dpt.from_numpy(Xnp, usm_type=usm_type, queue=q)
565+
Xusm = dpt.from_numpy(Xnp, usm_type=usm_type, sycl_queue=q)
566566
Ynp = np.ones(shape, dtype=dtype)
567567
ind = (slice(None, None, None),) * Ynp.ndim
568568
Xusm[ind] = Ynp

0 commit comments

Comments
 (0)