Skip to content

Commit ea1e663

Browse files
committed
Fixes unhelpful ValueError when no arguments are passed to broadcast_arrays
1 parent 26d34f5 commit ea1e663

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dpctl/tensor/_manipulation_functions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ def broadcast_arrays(*args):
265265
`device` and `usm_type` attributes as its corresponding input
266266
array.
267267
"""
268+
if len(args) == 0:
269+
raise ValueError("`broadcast_arrays` requires at least one argument")
268270
for X in args:
269271
if not isinstance(X, dpt.usm_ndarray):
270272
raise TypeError(f"Expected usm_ndarray type, got {type(X)}.")

0 commit comments

Comments
 (0)