Skip to content

Commit d8a3e65

Browse files
committed
Change asarray to astype in dpnp_fill
NumPy arrays are no longer permitted and queue coercion does not occur in the `fill` method, so `astype` is sufficient
1 parent 985b4fa commit d8a3e65

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

dpnp/dpnp_algo/dpnp_fill.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,7 @@ def dpnp_fill(arr, val):
5050
raise dpu.ExecutionPlacementError(
5151
"Input arrays have incompatible queues."
5252
)
53-
a_val = dpt.asarray(
54-
val,
55-
dtype=arr.dtype,
56-
usm_type=arr.usm_type,
57-
sycl_queue=exec_q,
58-
)
53+
a_val = dpt.astype(val, arr.dtype)
5954
a_val = dpt.broadcast_to(a_val, arr.shape)
6055
_manager = dpu.SequentialOrderManager[exec_q]
6156
dep_evs = _manager.submitted_events

0 commit comments

Comments
 (0)