@Action(units=(None, 'seconds', None), values=(None, None, _GROUP_BY))
    def read(self, samples_per_channel=None, timeout=10.0, group_by='scan'):

        if samples_per_channel in (None, -1):
            samples_per_channel = self.samples_per_channel_available()

        if self.one_channel_for_all_lines:
            nof_lines = []
            for channel in self.names_of_channels():
                nof_lines.append(self.number_of_lines (channel))
            c = int (max (nof_lines))
            dtype = getattr(np, 'uint%s' % (8 * c))
        else:
            c = 1
            dtype = np.uint8

        number_of_channels = self.number_of_channels()

        if group_by == Constants.Val_GroupByScanNumber:
            data = np.zeros((samples_per_channel, number_of_channels),dtype=dtype)
        else:
            data = np.zeros((number_of_channels, samples_per_channel),dtype=dtype)

        err, count, bps = self.lib.ReadDigitalLines(samples_per_channel, float64 (timeout),
              group_by, data.ctypes.data, uInt32 (data.size * c),
              RetValue('i32'), RetValue('i32'),
              None
        )
        if count < samples_per_channel:
            if group_by == 'scan':
                return data[:count], bps
            else:
                return data[:,:count], bps
        return data, bps
Generate SQL to transform an existing unique constraint
dataset/ETHPy150Open LabPy/lantz/lantz/drivers/legacy/ni/daqmx/tasks.py/DigitalTask.read--crossover with--dataset/ETHPy150Open perseas/Pyrseas/pyrseas/dbobject/constraint.py/UniqueConstraint.diff_map