def [] *indexes
      positions = @index.pos(*indexes)
      return category_from_position(positions) if positions.is_a? Integer

      Daru::Vector.new positions.map { |pos| category_from_position pos },
        index: @index.subset(*indexes),
        name: @name,
        type: :category,
        ordered: @ordered,
        categories: categories
    end
def [] *indexes
      positions = @index.pos(*indexes)
      return category_from_position(positions) if positions.is_a? Integer

      Daru::Vector.new positions.map { |pos| category_from_position pos },
        index: @index.subset(*indexes),
        name: @name,
        type: :category,
        ordered: @ordered,
        categories: categories
    end
Returns vector for indexes/positions specified
 @param [Array] indexes for which values has to be retrived
 @note Since it accepts both indexes and postions. In case of collision,
   argument will be treated as index
 @return vector containing values specified at specified indexes/positions
 @example
   dv = Daru::Vector.new [:a, 1, :a, 1, :c],
     type: :category,
     index: 'a'..'e'
   dv[:a, 1]
   # => #<Daru::Vector(2)>
   #   a   a
   #   b   1
   dv[0, 1]
   # => #<Daru::Vector(2)>
   #   a   a
   #   b   1