def pos *indexes
      positions = indexes.map do |index|
        if include? index
          @cat_hash[index]
        elsif index.is_a?(Numeric) && index < @array.size
          index
        else
          raise IndexError, "#{index.inspect} is neither a valid category"\
            ' nor a valid position'
        end
      end

      positions.flatten!
      positions.size == 1 ? positions.first : positions.sort
    end
Returns positions given categories or positions
@note If the argument does not a valid category it treats it as position
value and return it as it is.
@param indexes [Array<object>] categories or positions
@example
x = Daru::CategoricalIndex.new [:a, 1, :a, 1, :c]
x.pos :a, 1
# => [0, 1, 2, 3]