diff --git a/doc/source/array.rst b/doc/source/array.rst index c34723b26477c98f20ad60fbab070f168e3b82c1..93e558778fab5b37017d0a09a915c8b69c31b7a8 100644 --- a/doc/source/array.rst +++ b/doc/source/array.rst @@ -113,7 +113,7 @@ Constructing :class:`Array` Instances A synonym for the :class:`Array` constructor. -.. function:: zeros(context, queue, shape, dtype, allocator=None) +.. function:: zeros(context, queue, shape, dtype, order="C", allocator=None) Same as :func:`empty`, but the :class:`Array` is zero-initialized before being returned. diff --git a/pyopencl/array.py b/pyopencl/array.py index a193aaa4194218973ddebe67e326cf3dc01eab4a..a75430518db373dec74d22a90bd0dc923fd712cb 100644 --- a/pyopencl/array.py +++ b/pyopencl/array.py @@ -520,7 +520,7 @@ def to_device(context, queue, ary, allocator=None, async=False): empty = Array -def zeros(context, queue, shape, dtype, allocator=None): +def zeros(context, queue, shape, dtype, order="C", allocator=None): """Returns an array of the given shape and dtype filled with 0's.""" result = Array(context, shape, dtype,