# File lib/ai4r/data/data_set.rb, line 227
      def check_data_items(data_items)
        if !data_items || data_items.empty?
          raise ArgumentError, "Examples data set must not be empty."
        elsif !data_items.first.is_a?(Enumerable)
          raise ArgumentError, "Unkown format for example data."
        end
        attributes_num = data_items.first.length
        data_items.each_index do |index|
          if data_items[index].length != attributes_num
            raise ArgumentError,
                  "Quantity of attributes is inconsistent. " +
                          "The first item has #{attributes_num} attributes "+
                          "and row #{index} has #{data_items[index].length} attributes"
          end
        end
      end