scikits.cuda.misc.zeros

scikits.cuda.misc.zeros(shape, dtype, allocator=<Mock object at 0x2aade3828850>)[source]

Return an array of the given shape and dtype filled with zeros.

Parameters:

shape : tuple

Array shape.

dtype : data-type

Data type for the array.

allocator : callable

Returns an object that represents the memory allocated for the requested array.

Returns:

out : pycuda.gpuarray.GPUArray

Array of zeros with the given shape and dtype.

Notes

This function exists to work around the following numpy bug that prevents pycuda.gpuarray.zeros() from working properly with complex types in pycuda 2011.1.2: http://projects.scipy.org/numpy/ticket/1898