scikits.cuda.misc.ones

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

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

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 ones with the given shape and dtype.