(ary, allocator=drv.mem_alloc)
return result
converts a numpy array to a GPUArray
converts a numpy array to a GPUArray
converts a numpy array to a GPUArray
def to_gpu(ary, allocator=drv.mem_alloc):
    """converts a numpy array to a GPUArray"""
    result = GPUArray(ary.shape, ary.dtype, allocator, strides=_compact_strides(ary))
    result.set(ary)
    return result
def to_gpu ( ary , allocator = drv . mem_alloc ) : result = GPUArray ( ary . shape , ary . dtype , allocator , strides = _compact_strides ( ary ) ) result . set ( ary ) return result