code: def olindices(order, dim):
      
      indices = [olindex(o, dim) for o in range(order+1)]
      indices = numpy.vstack(indices)
      return indices
docs: Create an lexiographical sorted basis for a given order.
  
      Examples:
          >>> chaospy.bertran.olindices(2, 2)
          array([[0, 0],
                 [0, 1],
                 [1, 0],
                 [0, 2],
                 [1, 1],
                 [2, 0]])