We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
_cast_fill_val
dpctl.tensor._ctors
1 parent 478397f commit f782d1cCopy full SHA for f782d1c
dpnp/dpnp_algo/dpnp_fill.py
@@ -26,7 +26,7 @@
26
27
import dpctl.tensor as dpt
28
import dpctl.utils as dpu
29
-import numpy as np
+from dpctl.tensor._ctors import _cast_fill_val
30
from dpctl.tensor._tensor_impl import (
31
_copy_usm_ndarray_into_usm_ndarray,
32
_full_usm_ndarray,
@@ -70,7 +70,7 @@ def dpnp_fill(arr, val):
70
elif val_type is complex and dpnp.issubdtype(dt, dpnp.floating):
71
val = val.real
72
elif val_type is int and dpnp.issubdtype(dt, dpnp.integer):
73
- val = np.asarray(val, dtype=dt)[()]
+ val = _cast_fill_val(val, dt)
74
75
_manager = dpu.SequentialOrderManager[exec_q]
76
dep_evs = _manager.submitted_events
0 commit comments