Skip to content

Commit

Permalink
More useful error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwala committed Nov 14, 2018
1 parent e2495c6 commit 4b69c5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyopencl/algorithm.py
Expand Up @@ -1120,12 +1120,12 @@ def __call__(self, queue, n_objects, *args, **kwargs):
data_args.append(arg_val)
if arg_descr.with_offset:
raise ValueError(
"with_offset=True specified for argument '%d' "
"but the argument is not an array." % i)
"with_offset=True specified for argument %d "
"but the argument is not an array" % i)
continue

if arg_val.ndim != 1:
raise ValueError("Only 1D arrays supported")
raise ValueError("argument %d is a multidimensional array" % i)

data_args.append(arg_val.base_data)
if arg_descr.with_offset:
Expand Down

0 comments on commit 4b69c5e

Please sign in to comment.