(self)
return GPUArray(
            shape=new_shape,
            dtype=self.dtype,
            allocator=self.allocator,
            strides=new_strides,
            base=self,
            gpudata=int(self.gpudata),
        )
Returns a view of the array with dimensions of
        length 1 removed.
Returns a view of the array with dimensions of
        length 1 removed.
Returns a view of the array with dimensions of length 1 removed .
def squeeze(self):
        """
        Returns a view of the array with dimensions of
        length 1 removed.
        """
        new_shape = tuple([dim for dim in self.shape if dim > 1])
        new_strides = tuple(
            [self.strides[i] for i, dim in enumerate(self.shape) if dim > 1]
        )

        return GPUArray(
            shape=new_shape,
            dtype=self.dtype,
            allocator=self.allocator,
            strides=new_strides,
            base=self,
            gpudata=int(self.gpudata),
        )
def squeeze ( self ) : new_shape = tuple ( [ dim for dim in self . shape if dim > 1 ] ) new_strides = tuple ( [ self . strides [ i ] for i , dim in enumerate ( self . shape ) if dim > 1 ] ) return GPUArray ( shape = new_shape , dtype = self . dtype , allocator = self . allocator , strides = new_strides , base = self , gpudata = int ( self . gpudata ) , )