Exemple #1
0
    def round(self, decimals=0):
        mask = None
        if self.has_null_mask:
            mask = self.nullmask

        rounded = cudautils.apply_round(self.data.mem, decimals)
        return NumericalColumn(data=Buffer(rounded), mask=mask,
                               dtype=self.dtype)
Exemple #2
0
    def round(self, decimals=0):
        if decimals < 0:
            msg = "Decimal values < 0 are not yet supported."
            raise NotImplementedError(msg)

        if np.issubdtype(self.dtype, np.integer):
            return self

        data = Buffer(cudautils.apply_round(self.data.mem, decimals))
        return self.replace(data=data)
Exemple #3
0
    def round(self, decimals=0):
        if decimals < 0:
            msg = "Decimal values < 0 are not yet supported."
            raise NotImplementedError(msg)

        if np.issubdtype(self.dtype, np.integer):
            return self

        data = Buffer(cudautils.apply_round(self.data_array_view, decimals))
        return column.build_column(data=data, dtype=self.dtype, mask=self.mask)
Exemple #4
0
 def round(self, decimals=0):
     data = Buffer(cudautils.apply_round(self.data.mem, decimals))
     return self.replace(data=data)