From e2495c60b06947a5d0e567cdbc48091ecaba1974 Mon Sep 17 00:00:00 2001
From: Matt Wala <wala1@illinois.edu>
Date: Tue, 13 Nov 2018 22:08:12 -0600
Subject: [PATCH] Update docs to state that we allow arrays or memoryobjects.

---
 pyopencl/algorithm.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pyopencl/algorithm.py b/pyopencl/algorithm.py
index 513e5ad8..a5576796 100644
--- a/pyopencl/algorithm.py
+++ b/pyopencl/algorithm.py
@@ -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)
-- 
GitLab