(
            self, data, is_many_chan, is_many_line)
Verifies that the shape of the specified NumPy array can be used
        to read samples from the current task which contains one or more
        channels that have one or more digital lines per channel, if the
        "verify_array_shape" property is set to True.

        Args:
            data (numpy.ndarray): Specifies the NumPy array to verify.
            is_many_chan (bool): Specifies if the read method is a
                many channel version.
            is_many_line (bool): Specifies if the read method is a
                many line version.
Verifies that the shape of the specified NumPy array can be used
        to read samples from the current task which contains one or more
        channels that have one or more digital lines per channel, if the
        "verify_array_shape" property is set to True.
Verifies that the shape of the specified NumPy array can be used to read samples from the current task which contains one or more channels that have one or more digital lines per channel if the verify_array_shape property is set to True .
def _verify_array_digital_lines(
            self, data, is_many_chan, is_many_line):
        """
        Verifies that the shape of the specified NumPy array can be used
        to read samples from the current task which contains one or more
        channels that have one or more digital lines per channel, if the
        "verify_array_shape" property is set to True.

        Args:
            data (numpy.ndarray): Specifies the NumPy array to verify.
            is_many_chan (bool): Specifies if the read method is a
                many channel version.
            is_many_line (bool): Specifies if the read method is a
                many line version.
        """
        if not self._verify_array_shape:
            return

        channels_to_read = self._in_stream.channels_to_read
        number_of_channels = len(channels_to_read.channel_names)
        number_of_lines = self._in_stream.di_num_booleans_per_chan

        array_shape = None
        if is_many_chan:
            if is_many_line:
                array_shape = (number_of_channels, number_of_lines)
            else:
                array_shape = (number_of_channels,)
        else:
            if is_many_line:
                array_shape = (number_of_lines,)

        if array_shape is not None and data.shape != array_shape:
            raise DaqError(
                'Read cannot be performed because the NumPy array passed into '
                'this function is not shaped correctly. You must pass in a '
                'NumPy array of the correct shape based on the number of '
                'channels in task and the number of digital lines per '
                'channel.\n\n'
                'Shape of NumPy Array provided: {0}\n'
                'Shape of NumPy Array required: {1}'
                .format(data.shape, array_shape),
                DAQmxErrors.UNKNOWN.value, task_name=self._task.name)
def _verify_array_digital_lines ( self , data , is_many_chan , is_many_line ) : if not self . _verify_array_shape : return channels_to_read = self . _in_stream . channels_to_read number_of_channels = len ( channels_to_read . channel_names ) number_of_lines = self . _in_stream . di_num_booleans_per_chan array_shape = None if is_many_chan : if is_many_line : array_shape = ( number_of_channels , number_of_lines ) else : array_shape = ( number_of_channels , ) else : if is_many_line : array_shape = ( number_of_lines , ) if array_shape is not None and data . shape != array_shape : raise DaqError ( 'Read cannot be performed because the NumPy array passed into ' 'this function is not shaped correctly. You must pass in a ' 'NumPy array of the correct shape based on the number of ' 'channels in task and the number of digital lines per ' 'channel.\n\n' 'Shape of NumPy Array provided: {0}\n' 'Shape of NumPy Array required: {1}' . format ( data . shape , array_shape ) , DAQmxErrors . UNKNOWN . value , task_name = self . _task . name )