File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1480,7 +1480,20 @@ def full_like(
1480
1480
_manager .add_event_pair (hev , copy_ev )
1481
1481
return res
1482
1482
else :
1483
+ fill_value_type = type (fill_value )
1484
+ dtype = _get_dtype (dtype , sycl_queue , ref_type = fill_value_type )
1483
1485
res = _empty_like_orderK (x , dtype , usm_type , sycl_queue )
1486
+ if fill_value_type in [float , complex ] and np .issubdtype (
1487
+ dtype , np .integer
1488
+ ):
1489
+ fill_value = int (fill_value .real )
1490
+ elif fill_value_type is complex and np .issubdtype (
1491
+ dtype , np .floating
1492
+ ):
1493
+ fill_value = fill_value .real
1494
+ elif fill_value_type is int and np .issubdtype (dtype , np .integer ):
1495
+ fill_value = _to_scalar (fill_value , dtype )
1496
+
1484
1497
_manager = dpctl .utils .SequentialOrderManager [sycl_queue ]
1485
1498
# populating new allocation, no dependent events
1486
1499
hev , full_ev = ti ._full_usm_ndarray (fill_value , res , sycl_queue )
You can’t perform that action at this time.
0 commit comments