scikits.cuda.misc.ones_like

scikits.cuda.misc.ones_like(other)[source]

Return an array of ones with the same shape and type as a given array.

Parameters:

other : pycuda.gpuarray.GPUArray

Array whose shape and dtype are to be used to allocate a new array.

Returns:

out : pycuda.gpuarray.GPUArray

Array of ones with the shape and dtype of other.