Skip to content
Snippets Groups Projects
Commit e2495c60 authored by Matt Wala's avatar Matt Wala
Browse files

Update docs to state that we allow arrays or memoryobjects.

parent e6ba51c0
No related branches found
No related tags found
No related merge requests found
......@@ -1042,8 +1042,8 @@ class ListOfListsBuilder:
def __call__(self, queue, n_objects, *args, **kwargs):
"""
:arg args: arguments corresponding to arg_decls in the constructor.
:class:`pyopencl.array.Array` are not allowed directly and should
be passed as their :attr:`pyopencl.array.Array.data` attribute instead.
Arguments must be either 1D :class:`pyopencl.array.Array' objects
or :class:`pyopencl.MemoryObject' objects.
:arg allocator: optionally, the allocator to use to allocate new
arrays.
:arg omit_lists: An iterable of list names that should *not* be built
......@@ -1124,6 +1124,9 @@ class ListOfListsBuilder:
"but the argument is not an array." % i)
continue
if arg_val.ndim != 1:
raise ValueError("Only 1D arrays supported")
data_args.append(arg_val.base_data)
if arg_descr.with_offset:
data_args.append(arg_val.offset)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment