'Instantiate a new instance of the GPUTensor class setting each element
value to 1.
Arguments:
shape (list of ints): The size of each dimension of the Tensor.
dtype (dtype, optional): Element data type.  If not specified we
use default_dtype value (\'float32\'
unless overridden).
persist_values (bool, optional): If set to True (the default), the
values assigned to this Tensor
will persist across multiple begin
and end calls.  Setting to False
may provide a performance increase
if values do not need to be
maintained across such calls
allocator (function, optional): Memory allocator.
Returns:
GPUTensor: newly created data structure reference'

def ones(self, shape, dtype=None, name=None, persist_values=True, parallel=False, distributed=False, allocator=drv.mem_alloc):

    dtype = (self.default_dtype if (dtype is None) else dtype)
    return GPUTensor(self, shape, dtype=dtype, name=name, persist_values=persist_values, allocator=allocator, rounding=self.round_mode)._assign(1)
