Skip to content

Commit 9691cf0

Browse files
committed
Tweak error messages in dpnp_fill
1 parent c64dc0b commit 9691cf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dpnp/dpnp_algo/dpnp_fill.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def dpnp_fill(arr, val):
4545
if dpnp.is_supported_array_type(val):
4646
val = dpnp.get_usm_ndarray(val)
4747
if val.shape != ():
48-
raise ValueError("`val` must be a scalar")
48+
raise ValueError("`val` must be a scalar or 0D-array")
4949
if dpu.get_execution_queue((exec_q, val.sycl_queue)) is None:
5050
raise dpu.ExecutionPlacementError(
5151
"Input arrays have incompatible queues."
@@ -66,7 +66,7 @@ def dpnp_fill(arr, val):
6666
return
6767
elif not dpnp.isscalar(val):
6868
raise TypeError(
69-
f"Expected `val` to be an array or Python scalar, got {type(val)}"
69+
f"Expected `val` to be a 0D-array or Python scalar, got {type(val)}"
7070
)
7171

7272
dt = arr.dtype

0 commit comments

Comments
 (0)