def __rtruediv__()

in torcharrow/velox_rt/numerical_column_cpu.py [0:0]


    def __rtruediv__(self, other):
        self._prototype_support_warning("__rtruediv__")

        if isinstance(other, NumericalColumnCpu):
            col = velox.Column(get_velox_type(dt.float64))
            assert len(self) == len(other)
            for i in range(len(self)):
                self_data = self._getdata(i)
                if self._getmask(i) or other._getmask(i):
                    col.append_null()
                elif self_data == 0:
                    col.append_null()
                else:
                    col.append(other._getdata(i) / self_data)
            return ColumnFromVelox._from_velox(self.device, dt.float64, col, True)
        else:
            col = velox.Column(get_velox_type(dt.float64))
            for i in range(len(self)):
                self_data = self._getdata(i)
                if self._getmask(i) or self._getdata(i) == 0:
                    col.append_null()
                elif self_data == 0:
                    col.append_null()
                else:
                    col.append(other / self_data)
            return ColumnFromVelox._from_velox(self.device, dt.float64, col, True)