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

        if samples_per_channel is None:
            samples_per_channel = self.samples_per_channel_available()

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

        err, data, count = self.lib.ReadAnalogF64(samples_per_channel, timeout, group_by,
                                                  data.ctypes.data, data.size, RetValue('i32'), None)

        if samples_per_channel < count:
            if group_by == 'scan':
                return data[:count]
            else:
                return data[:,:count]

        return data
Reads multiple floating-point samples from a task that
dataset/ETHPy150Open LabPy/lantz/lantz/drivers/legacy/ni/daqmx/tasks.py/AnalogInputTask.read