(self, other_ary, name=None)
return GPUTensor(self, other_ary.shape, dtype=other_ary.dtype,
                         name=name,
                         persist_values=getattr(other_ary, 'persist_values', True),
                         allocator=getattr(other_ary, 'allocator', drv.mem_alloc),
                         rounding=self.round_mode)
Instantiate a new instance of this backend's Tensor class, with the
        shape taken from ary.

        Arguments:
            ary (tensor object): Tensor to inherit the dimensions of.
            dtype (data-type, optional): If present, specifies the underlying
                                         type to employ for each element.

        Returns:
            Tensor: array object
Instantiate a new instance of this backend's Tensor class, with the
        shape taken from ary.
Instantiate a new instance of this backend s Tensor class with the shape taken from ary .
def empty_like(self, other_ary, name=None):
        """
        Instantiate a new instance of this backend's Tensor class, with the
        shape taken from ary.

        Arguments:
            ary (tensor object): Tensor to inherit the dimensions of.
            dtype (data-type, optional): If present, specifies the underlying
                                         type to employ for each element.

        Returns:
            Tensor: array object
        """
        # if other_ary is a numpy array it wont have attr persist_values or
        # allocator so use default values in that case.
        return GPUTensor(self, other_ary.shape, dtype=other_ary.dtype,
                         name=name,
                         persist_values=getattr(other_ary, 'persist_values', True),
                         allocator=getattr(other_ary, 'allocator', drv.mem_alloc),
                         rounding=self.round_mode)
def empty_like ( self , other_ary , name = None ) : # if other_ary is a numpy array it wont have attr persist_values or # allocator so use default values in that case. return GPUTensor ( self , other_ary . shape , dtype = other_ary . dtype , name = name , persist_values = getattr ( other_ary , 'persist_values' , True ) , allocator = getattr ( other_ary , 'allocator' , drv . mem_alloc ) , rounding = self . round_mode )